Posted by:
P15
(---.range86-180.btcentralplus.com)
Hi all,
I am having a problem with my virtual sites with links and stylesheets. For example I have a site located at C:\wamp\www\cuosc
Within the webpages I use PHP includes for the header and navigation - the links and stylesheets are therefore set as following which work fine on my live site:
link rel="stylesheet" href="/styles/screen.css
a href="/news/index.php
However when I go to [
localhost] it can't find the stylesheet and the links are all [
localhost] rather than [
localhost]
I have done the following:
1. Created the folder C:\wamp\www\cuosc
2. Created the folder C:\wamp\www\cuosc\logs
3. Edited C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf to:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
4. Edited C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf to:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName cuosc
DocumentRoot C:/wamp/www/cuosc
ErrorLog "C:/wamp/www/cuosc/logs/error.log"
CustomLog "C:/wamp/www/cuosc/logs/access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
ErrorLog "C:/wamp/www/logs/error.log"
CustomLog "C:/wamp/www/logs/access.log" common
</VirtualHost>
5. Edited C:\Windows\System32\drivers\etc\HOSTS to:
127.0.0.1 localhost
127.0.0.1 cuosc
Any help would be appreciated - I'm sure I'll have missed something obvious but this is completely new to me so apologies in advance if it is!
Cheers.