carpman
10-18-2001, 03:24 PM
Hello i have installed apache, mysql and php on my win2k workstation.
I would like to set it up so i just type and
http://loaclhost/website/
and have the website i am working on displayed. i have tried playing with the virtualhost settiing in httpd.conf but can't see to get it right, anyone help?
many thanks
Could you be more specific?
What entry have you made in the .conf file?
Have you restarted after the change?
carpman
10-18-2001, 05:38 PM
Thanks for reply.
I have set the server doc root as e:/web sites/
and added this to httpd.conf
<VirtualHost clientwebsite*>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /clients/clientswebsite/
ServerName clientwebsite.net
ErrorLog logs/clientwebsite.net-error_log
CustomLog logs/clientwebsite.net-access_log common
</VirtualHost>
mlovick
10-18-2001, 06:12 PM
Why not just create sub-folders in e:/web sites/ for each site - then you can get to each site with http://localhost/subfolder
I cant think of a more simple way to do this.
If you want http://localhost/
You can remove the VirtualHost directives.
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /clients/clientswebsite/
ServerName clientwebsite.net
ErrorLog logs/clientwebsite.net-error_log
CustomLog logs/clientwebsite.net-access_log common
TimPD
10-18-2001, 07:05 PM
Like Palm said that should work. If not let us know and we will give you another path. I mean that should easily work.
carpman
10-19-2001, 04:10 AM
Originally posted by mlovick
Why not just create sub-folders in e:/web sites/ for each site - then you can get to each site with http://localhost/subfolder
I cant think of a more simple way to do this.
yes this is done, how else would i store client websites, problem is that paths for images and linked css do not worked because they worked using siteroot path and if i use subfolder they are not in the siteroot.
carpman
10-19-2001, 04:20 AM
Originally posted by Palm
If you want http://localhost/
You can remove the VirtualHost directives.
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /clients/clientswebsite/
ServerName clientwebsite.net
ErrorLog logs/clientwebsite.net-error_log
CustomLog logs/clientwebsite.net-access_log common
Thanks for reply, i tried this but no joy, when i restart apache i get error for doc root
As i said the server docroot is set as e:/website/ and when i use localhost i can read files, i just need to mimic virtual server so site paths work.
when i try and acces above clientwebsite with http://localhost/clientwebsite/
or
http://localhost/clientwebsite.net
i get errors.
This is so easy to setup in IIS but don't want to use that as my web server is apache/linux.
I could set up a local linux server, which i have tried but still get same sort of problems.
thanks for your help
carpman
10-20-2001, 08:20 AM
Ok sorted, i used the alias directive and set links to be doc relative instead of siteroot.
Thanks for you help