osx - Not sure if correct httpd-vhosts.conf file is being read in OS X -
i'm trying apache server comes os x work local website. no matter change file httpd-vhosts.conf
to, when run httpd -s
in terminal says virtual host syntax ok. typed in bunch of random characters file, restarted apache, , still says configuration ok.
first edited /private/etc/hosts
, added line underneath 127.0.0.1 localhost
:
127.0.0.1 mysite
then edited /private/etc/apache2/httpd.conf
. uncommented line:
# virtual hosts include /private/etc/apache2/extra/httpd-vhosts.conf
i uncommented php5 line enable php.
next edited /private/etc/apache2/extra/httpd-vhosts.conf
, set virtual hosts. after restarting apache, virtual hosts not working , running httpd -s
said virtual hosts syntax ok. no erros in apache error log. httpd-vhosts.conf
file contained:
namevirtualhost *:80 <virtualhost *:80> documentroot "/users/gavin/web" servername localhost </virtualhost> <virtualhost *:80> documentroot "/users/gavin/web/mysite/public_html" servername mysite </virtualhost>
no matter did, virtual hosts not work. tried changing httpd-vhosts.conf
this:
namevirtualhost *:80 <virtualhost @*^#*&^#$> (#*&#*$&@(*uosksflksfjljf##*(& </virtualhost>
i restarted apache using sudo apachectl restart
, ran apachectl -s
, says:
httpd: not reliably determine server's qualified domain name, using gavins-macbook-pro.local servername virtualhost configuration: syntax ok
obviously httpd-vhosts.conf file not ok, file loading? in terminal ran httpd -v|grep server_config_file
, returned:
-d server_config_file="/private/etc/apache2/httpd.conf"
that's correct httpd.conf
file, what's going on here? ideas?
your should forward '/private/etc/apache2/users/' folder. there special (your username).conf can add virtual hosts.
Comments
Post a Comment