Tuesday, 27 August 2013

Apache + Redhat: Apache not detecting any conf file even though it's there?

Apache + Redhat: Apache not detecting any conf file even though it's there?

So I have a symlink to my config file in my sites-available, and a symlink
to that in my sites-enabled folder.
[emai@511863-web3 sites-available]$ ls
mysite-staging.conf
[emai@511863-web3 sites-available]$ cd ..
[emai@511863-web3 httpd]$ ls
conf conf.d logs modules run sites-available sites-enabled
[emai@511863-web3 httpd]$ cd sites-enabled/
[emai@511863-web3 sites-enabled]$ ls
mysite-staging.conf
[emai@511863-web3 sites-enabled]$ more mysite-staging.conf
<VirtualHost *:80>
RailsEnv "staging"
RackEnv "staging"
ServerName mysite-staging.nettheory.com
ServerAlias mysite-authorize-staging.nettheory.com
DocumentRoot /usr/local/www/mysite-staging/current/public
ErrorLog logs/mysite-staging/error_log
CustomLog logs/mysite-staging/access_log combined
<Directory /usr/local/www/mysite-staging/current/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
However, when I check the syntax, Apache doesn't detect anything.
[emai@511863-web3 sites-enabled]$ apachectl -S
VirtualHost configuration:
Syntax OK
[emai@511863-web3 sites-enabled]$ /usr/sbin/httpd -S
VirtualHost configuration:
Syntax OK
I restart apache and try to go to my site through a browser, but it only
gives me the default redhat linux page, and doesn't allow me to go on the
site because I'm guessing it's not up. Does anyone know why?

No comments:

Post a Comment