Forum Moderators: phranque
<VirtualHost my.ip>
ServerAdmin webmaster@website1.com
DocumentRoot "G:/website1"
ServerName www.website1.com
ServerAlias *.website1.com
Redirect / [website1.com:8080...]
ErrorLog logs/www.website1.com-error_log
CustomLog logs/www.website1.comt-access_log common
</VirtualHost>
<VirtualHost my.ip>
ServerAdmin webmaster@website2.com
DocumentRoot "G:/website2"
ServerName website2.com
ServerAlias *.website2.com
Redirect / [website2.com:8080...]
ErrorLog logs/website2-error.log
ScriptAlias /cgi-bin/ "G:/website2/cgi-bin/"
<Directory "G:/website2">
Options All Includes Indexes
</Directory>
</VirtualHost>
So I want to use port 8080 for both sites if possible. Will the redirect work or do I have to specify something in my DNS about port 8080 and if so can I use a CNAME for that or something?
You'll have to tell Apache to listen on port 8080 -- See the Listen directive.
You're apparently using an unconditional redirect to port 8080. That will put the client browser into a loop. I'd suggest you use mod_rewrite to redirect to port 8080 only if the request is to port 80, or alternatively, to any port other than 8080.
Jim