VirtualHost configuration
I have a website domain.com and a mobile version on m.domain.com. The regular site is in /home/www/html/domain.com and the mobile version is in /home/www/html/domain.com/m.
Is something like this in /etc/httpd/conf.d/domain.com.conf correct, or can I do it differently / better? <VirtualHost *:80> ServerRoot /home/www/html/domain.com ServerName domain.com </VirtualHost> <VirtualHost *:80> ServerRoot /home/www/html/domain.com/m ServerAlias m.smutaroo.com </VirtualHost> Is this how I do it or not. I am used to cPanel and I've never really worked on things like this. httpd -t returns syntax ok but I have some connectivity problems with this website (it does not work / load basically) and it looks like it could be related to this. Thanks. |
And this is kind of odd, because if I go to domain.com it does not work at all, but when I enter domain.com/phpinfo.php it loads normally / right away.
Edit: I have 6 different websites on the server and 6 separate config files like this in /etc/httpd/conf.d The websites dont seem to load very good, and this could be related to this. Should I put it all in one file maybe and write it out differently all together, or what would be the best way to go? |
On network side, ping domain.com and ping m.smutaroo.com are ok?
|
Quote:
|
Now replace all ServerRoot words with DocumentRoot in your conf files
ServerRoot is for the installed server dir, nothing to do with vh |
Quote:
|
You have more than what you posted in VHs configs? Any Directory directives that add settings for DocumentRoot directories?
|
Quote:
|
I get a strange error, in red, when I enter systemtcl stauts http. It looks like mod_evasive blacklist my own IP (the server IP, the one on which the websites are hosted) because of a possible DoS attack.
|
Quote:
Best Laugh I've had this week. |
All times are GMT -5. The time now is 05:46 PM. |