VHOST not working in Apache
Posted
by
Starx
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Starx
Published on 2011-07-10T08:32:04Z
Indexed on
2012/09/23
15:50 UTC
Read the original article
Hit count: 427
apache
|virtualhost
I got a LAMP server working in Ubuntu 11.04. Now the problem is that the websites have to enabled and disabled from the terminal. All all of them have to be accessed from http://localhost
which is not so much efficient. So I created a VHOSTS, using some tutorials off the net.
Here is the coding for it
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Servername site.com
ServerAlias www.site.com
DocumentRoot /home/starx/public_html/site/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/starx/public_html/site/public>
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>
nGen
ErrorLog ${APACHE_LOG_DIR}/site-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/site-access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Now, still I can't access the page in http://site.com
but if i access using http://localhsot/
it is accessed.
I have disabled all others site including default and have just enabled one site i.e. site
How to fix this?
© Ask Ubuntu or respective owner