<VirtualHost 127.0.0.1:444>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
<Directory /home/test/public_beta>
AllowOverride All
</Directory>
DocumentRoot /home/test/public_beta
ServerName me.dev
ProxyPass / http://me.dev:8044
ProxyPassReverse / http://me.dev:8044
What does above mean? Will it redirect request to port 8044 to / or /var/www/html ? whats does Directory and DocumentRoot mean here?
The
<Directory>
directive is used to assign special commands just for that hard-drive location, in this case, it tells apache what to do when it encounters an.htaccess
file in that directory. TheDocumentRoot
tells apache where the 'home page' web files would be, if it weren't for theProxyPass
directive, which tells apache to redirect EVERYTHING to me.dev on port 8044.I bet if you commented them out it would work exactly the same.
There is a complete guide to all the directives online: http://httpd.apache.org/docs/1.3/
Basically, every request (including redirects) will be proxied to
http://me.dev:8044
For instance,
https://localhost:444/something/page.html
should respond fromhttp://me.dev:8044/something/page.html
this will redirect Request to http://127.0.0.1:444/ to http://me.dev:8044/. This snippets doesn't tell whether the directory behind http://me.dev:8044/ is / or /var/www/html. The DocumentRoot and Directory Settings is not really necessary because of the ProxyPass directive.
you can find even more details in the documentation:
ProxyPass
DocumentRoot