ServerAlias override server name?
- by GusDeCooL
I tried to setting up virtual host with apache2 on my ubuntu server.
my serverName is not working, it show wrong document, but the server alias is showing right document. How is that happen?
Here is my virtual host config:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName bungamata.web.id
ServerAlias www.bungamata.web.id
DocumentRoot /home/gusdecool/host/bungamata.web.id
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/gusdecool/host/bungamata.web.id>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
if you access http://bungamata.web.id it shows wrong document, but if you open http://www.bungamata.web.id it open the rights document. The right document should have content "testing gan"