I have set up the wiki software Gitit to run on two separate ports of the same Apache server (ports 1848 and 4000). I've confirmed that they are running.
Now I want to proxy these two sites to prettier URLs, like sitea.com and siteb.com. The IP address for both is the same (say, 18.104.22.168).
My server admin has added DNS entries for the names, but I can't seem to get my Apache configuration to work. Following the instructions here, I tried to set up a VirtualHost like this:
NameVirtualHost *:1848 <VirtualHost *:1848> ServerName sitea.com DocumentRoot /var/www/ RewriteEngine On ProxyPreserveHost On ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPassReverse / http://127.0.0.1:1848 RewriteRule ^(.*) http://127.0.0.1:1848$1 [P] ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost>
And another similar virtual host for the other on port 4000. But when I then issue
service httpd restart, I get a
FAILED message when starting httpd, and my browser can't connect to sitea.com.
As far as I know, the rest of my httpd.conf is the default file that comes with the distribution. My server is being run on a RedHat Enterprise machine. I'm a newbie to Apache, so I'm sure there's an obvious answer here, but after trying various tweaks to the config, I can't figure out what I'm doing wrong.
EDITED: The problem was that I didn't check to make sure the pathnames to my error logs was correct. My distribution stores logs in /var/log/httpd not /var/log/apache2. (Blushes.)