Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
    <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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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. The DocumentRoot tells apache where the 'home page' web files would be, if it weren't for the ProxyPass 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 from http://me.dev:8044/something/page.html

share|improve this answer
    
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? –  lakshmipathi Sep 8 '10 at 9:58
    
No, your <VirtualHost 127.0.0.1:444> explicitly only refers to the localhost. You should change that to your actual IP address for remote machines to connect to it. –  Grizly Sep 8 '10 at 10:41
    
thanks Grizly... –  lakshmipathi Sep 8 '10 at 10:46

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

share|improve this answer
    
thanks.How to find "This snippets doesn't tell whether the directory behind me.dev:8044 is / or /var/www/html. " ? should i look into /etc/httpd/conf/httpd.conf file? –  lakshmipathi Sep 8 '10 at 9:56
    
It might be this file. You have to search for the configuration of the virtual host me.dev with Port 8044. –  Christian Sep 8 '10 at 10:25
    
thanks Christian,both you answered my questions.thanks a lot. –  lakshmipathi Sep 8 '10 at 10:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.