I'd like to point a given port (127.0.0.1:296) to a given directory in the htdocs folder. I'm sure it'd be pretty easy because you can modify the port 80 value, but I'm not definate. I'd like to have multiple ports point to different folders which is the main reason behind wanting this.
If you could help me with this, I would greatly appreciate it.
[SOLVED] Ports point to certain directories on Apache 2.x?
Moderator: General Moderators
[SOLVED] Ports point to certain directories on Apache 2.x?
Last edited by phice on Fri Feb 03, 2006 2:54 pm, edited 2 times in total.
Code: Select all
<Virtualhost 127.0.0.1:123>
DocumentRoot /var/123
</VirtualHost>
<VirtualHost 127.0.0.1:321>
DocumentRoot /dev/network
</Virtualhost>Looks like you forgot the Listen variable.
- Don
Code: Select all
# 81 - /dir1/
Listen 81
<Virtualhost *:81>
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/dir1/"
</VirtualHost>
# 82 - /dir2/
Listen 82
<Virtualhost *:82>
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/dir2/"
</VirtualHost>
# 83 - /dir3/
Listen 83
<VirtualHost *:83>
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/dir3/"
</Virtualhost>- Don