I have installed CentOS 6.5 on my VPS (IP 149.210.167.9). Eventually I want to serve multiple domains, but for now I only want to handle 1 domain in particular: aforismo.eu. When you surf to the IP directly it shows me an Apache test page, so that works. When I ping aforismo.eu it shows me the correct IP, so I think the DNS is setup correctly. If I'm missing something trivial, please teach me :)
What I did so far to handle this domain:
I) I've created /etc/httpd/conf.d/site-aforismo.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/aforismo.eu/public/
ServerName aforismo.eu
ServerAlias *.aforismo.eu
ErrorLog logs/aforismo.error_log
CustomLog logs/aforismo.access_log common
</VirtualHost>
II) Modified a few bits in /etc/http/conf/httpd.conf:
Include conf.d/*.conf
NameVirtualHost *:80
III) Afterwards I've restarted apache
service httpd restart
IV) Checking httpd -S results in:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 vps.vanoosten.me (/etc/httpd/conf.d/ssl.conf:74)
*:80 is a NameVirtualHost
default server aforismo.eu (/etc/httpd/conf.d/site-aforismo.conf:1)
port 80 namevhost aforismo.eu (/etc/httpd/conf.d/site-aforismo.conf:1)
wild alias *.aforismo.eu Syntax OK
But ... surfing to http://www.aforismo.eu (or http://aforismo.eu) does not work. Since it's not my everyday business, I'd sure miss something quite trivial, but I can't find out what it is. Can you help me a bit further? Much appreciated.
http://localhost)? - klugeramadig aforismo.eu ANYdoes not return any A record IPs. So the problem is probably somewhere else, not in the Apache Docs. - aularon