<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.htaccessfile in that directory. TheDocumentRoottells apache where the 'home page' web files would be, if it weren't for theProxyPassdirective, 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:8044For instance,
https://localhost:444/something/page.htmlshould respond fromhttp://me.dev:8044/something/page.htmllakshmipathi : thanks Grizly,for detailed explanation. I have issue,localhost:444/something works when i tried it from localmachine. But when I try this from different machine (say from virtual machine) i did something like ipaddress:444/something -- its not working. Will it work?Grizly : No, your `` explicitly only refers to the localhost. You should change that to your actual IP address for remote machines to connect to it. lakshmipathi : thanks Grizly...From Grizly -
Hi,
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
DocumentRootlakshmipathi : thanks.How to find "This snippets doesn't tell whether the directory behind http://me.dev:8044/ is / or /var/www/html. " ? should i look into /etc/httpd/conf/httpd.conf file?Christian : It might be this file. You have to search for the configuration of the virtual host me.dev with Port 8044.lakshmipathi : thanks Christian,both you answered my questions.thanks a lot.From Christian
0 comments:
Post a Comment