Forum Moderators: phranque
NameVirtualHost *:80
<VirtualHost>
ServerName localhost
RewriteEngine On
ProxyVia Block
ProxyPreserveHost On
RewriteRule ^/DotNetApp(.*)$ [localhost:81...] [P,L]
</VirtualHost>
But Apache service could not start with these settings. What came out was just a message box saying "The requested operation has failed" and the start-up failed. I ran test configuration and the error message was "ServerName takes one argument, the Host name and port of the server."
I did try several solutions taken from this thread
[webmasterworld.com...]
but no use.
Please help!
Thank you
Besides of this, there's a little mistake you made, the RewriteRule should look like this:
RewriteRule ^/DotNetApp/(.*)$ [localhost:81...] [P,L]
Not that it would make your Apache start up, but this makes the number of slashes in the resulting URL consistent.
Furthermore, I'd suggest you to use the ProxyPass [httpd.apache.org] directive instead of the rewriting, it is much simple to use. Don't forget to check the ProxyPassReverse [httpd.apache.org] directive too.
More information above configuring virtual hosts is available on this page and at the pages linked from it:
[httpd.apache.org...]
Jim