2

I am trying to start my Apache server through both webmin and putty, but I am getting the same error codes.

Apache was running perfectly fine before we did a restart of our VPS, now all the services started except for Apache.

We are running CentOS, the main error we are getting is posted below:

May 23 21:56:47 www.mydomain.com httpd[6234]: AH00526: Syntax error on line 373 of /etc/httpd/conf/httpd.conf:

May 23 21:56:47 www.mydomain.com httpd[6234]: Wrapper /home/mydomain/fcgi-bin/php5.fcgi cannot be accessed: (13)Permission denied

    Line 373: FCGIWrapper /home/vps78446/fcgi-bin/php5.fcgi .php
    Line 374: FCGIWrapper /home/vps78446/fcgi-bin/php5.fcgi .php5

I have tried editing the permissions, looking at the files called by php5.fcgi, and anything else I could find on the internet.

getent passwd return:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
chrony:x:998:996::/var/lib/chrony:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
systemd-bus-proxy:x:997:994:systemd Bus Proxy:/:/sbin/nologin
systemd-network:x:996:993:systemd Network Management:/:/sbin/nologin
apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
webalizer:x:67:67:Webalizer:/var/www/usage:/sbin/nologin
dovecot:x:97:97:Dovecot IMAP server:/usr/libexec/dovecot:/sbin/nologin
dovenull:x:995:992:Dovecot's unauthorized user:/usr/libexec/dovecot:/sbin/nologin
mysql:x:27:27:MariaDB Server:/var/lib/mysql:/sbin/nologin
mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin
postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash
named:x:25:25:Named:/var/named:/sbin/nologin
saslauth:x:994:76:Saslauthd user:/run/saslauthd:/sbin/nologin
clamupdate:x:993:991:Clamav database update user:/var/lib/clamav:/sbin/nologin
Kalgon:x:500:500::/home/Kalgon:/bin/sh
vitalitygaming:x:502:502:Main Site:/home/vitalitygaming:/bin/sh
vps78446:x:503:502:Main Site:/home/vps78446:/bin/sh
scgaminguser.vitalitygaming:x:506:502:SCGamingUser:/home/vitalitygaming/homes/scgaminguser:/bin/false
development.vitalitygaming:x:507:502:Development:/home/vitalitygaming/homes/development:/dev/null
dadenz.vitalitygaming:x:508:502:Dennis:/home/vitalitygaming/homes/dadenz:/dev/null
Ruli
  • 2,592
  • 12
  • 30
  • 40
  • As line `373` of `etc/httpd/conf/httpd.conf` could be pertinent I'd suggest adding that to the question and perhaps the surrounding lines. – MikeT May 24 '16 at 02:27
  • Thank you, added both lines there were returning errors. –  May 24 '16 at 02:38
  • You haven;t changed Apache version from below 2.5 to 2.5 or greater? If so then **FCGIWrapper** has been changed to **FcgidWrapper** (d after cgi). – MikeT May 24 '16 at 02:49
  • No sir, it is currently running Apache version 2.4.6. –  May 24 '16 at 02:52
  • Another thought, perhaps the syntax error is due to a previous line being at fault but only being detected when line 373 is reached. – MikeT May 24 '16 at 03:00
  • Again little knowledge of Wrappers, but what if you try excluding lines 373 and 374 (temporarily)? – MikeT May 24 '16 at 03:02
  • Although I have no clue what Wrappers do or how to use them or when. My experience with Apache (not that much imo) has shown that sometimes permission denied equates to file not found. Could it be that something has changed and that basically Apache isn't being pointed to the correct files? – MikeT May 24 '16 at 03:04
  • The files look to be pointed correctly, I have tried excluding those specific lines but again did not get anywhere (I first excluded line 373 which gave the same error for line 374). –  May 24 '16 at 03:25

1 Answers1

0

can you give us the permissions for those files, open terminal enter cd /home/vps78446/fcgi-bin/ then ls -la
post results:

edit: run the command below

sudo chown -R www-data:www-data /home/vps78446/fcgi-bin

try to run Apache after that

WildCard
  • 527
  • 3
  • 8
  • [root@mydomain fcgi-bin]# ls -la total 8 drwxrwxrwx. 2 mydomain mydomain 22 May 23 21:54 . drwxrwxrwx. 14 mydomain mydomain 4096 May 23 21:54 .. -rwxrwxrwx. 1 mydomain mydomain 214 Apr 27 14:25 php5.fcgi –  May 24 '16 at 03:27
  • Sorry if the above is formatted incorrect, again I am new to this website and don't know how to format things correctly.. –  May 24 '16 at 03:29
  • Hi, sorry for this possibly stupid question what what exactly should I put in place of www-data:www-data? Running that as is gave me this error " chown: invalid user: ‘www-data:www-data’ " But running it with 'root' and 'vitalitygaming' (Which came up in ls -la) did nothing (when I tried to start the server I got the same error. This is the complete response for la -la: total 8 drwxrwxrwx. 2 root vitalitygaming 22 May 23 21:54 . drwxrwxrwx. 14 vitalitygaming vitalitygaming 4096 May 23 21:54 .. -rwxrwxrwx. 1 root vitalitygaming 214 Apr 27 14:25 php5.fcgi –  May 24 '16 at 03:54
  • that should have been apache's username – WildCard May 24 '16 at 04:01
  • if you dont mind, can you show me all user names 'getent passwd' from terminal. try to space this one out when you paste it and put it in your answer for meplease – WildCard May 24 '16 at 04:02
  • @RyanStandal when posting comment if you click on help (below the add blue comment button) it tells some of the formatting codes you can use. Text enclosed in a pair of double asterixes is bold (\*\*text to be bold\*\*). Text enclosed in underscores(\_) is italic , Code you enclose in back-ticks ( shift key left of 1 above the tilda). Hope this displays correctly :) It did (back slash disables markdown so to show an underscore I did backslash underscore) – MikeT May 24 '16 at 04:05
  • Hi, sorry again for my lack of understanding by pasting it in my answer what do you mean? Do you mean simply answering the question or responding back as I am right now? Because posting it as it is now I will have to do so in multiple comments (There are not enough characters). @MikeT Thank you for your help, once again! I believe what I was trying to do was create a line break, but I suppose you cannot do so in comments.. –  May 24 '16 at 13:32
  • edit your question to include the usernames that you got with 'getent passwd' – WildCard May 24 '16 at 13:35
  • Gotcha, thank you for the clarification, the original question has been updated! –  May 24 '16 at 14:19