Jump to content

VirtualHosts not acting as desired.


Braxton

Recommended Posts

I have recently restructed my local web server and implemented VirtualHosts for using a subdomain. Currently the public_html is the directory for my domain and dev.domain.com lands in the dev directory, this is all working correctly. however, when I am working in my index.html in the dev directory and call for layout.css which is in static, it retreived the layout.css from the static folder in public_html/ and not the static directory in dev. How can I get around this issue? I have included the directory structure before if that helps. Sorry if my wording for explaining this is confusing.

 

-root

--public_html

---static

---etc

--subdomains

---dev

----static

----etc

---fate

 

Is the block in the vhost conf

NameVirtualHost *:80
<VirtualHost *:80>
    serverName domain.com
    DocumentRoot "E:\root\public_html"
</VirtualHost>


NameVirtualHost *:80
<VirtualHost *:80>
	ServerName dev.domain.com
	ServerAlias dev.domain.com
	DocumentRoot "E:\root\subdomains\dev"
	<Directory "E:\root\subdomains\dev">
		AllowOverride All
		order allow,deny
		Allow from all
	</Directory>
</VirtualHost>
Link to comment
https://forums.phpfreaks.com/topic/277359-virtualhosts-not-acting-as-desired/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.