Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache port forward [closed]

Tags:

I have apache couchDB active on http://localhost:5984/ which i need to access at http://localhost:80/couch/. I need to setup a reverse proxi for this. Need help with the configuration settings.

PS: Whats the best resource to learn about apache?

like image 232
Jaseem Avatar asked Feb 07 '12 17:02

Jaseem


People also ask

Why is port 80 closed?

If you cannot surf the web because port 80 is blocked, it is 99% likely the problem is your computer's firewall. If you cannot run a web server program on your computer, it could be any number of things- again, the firewall, anti-malware, or another web server already running.

Why all ports are closed?

It is common security practice to close unused ports in personal computers, so as to block public access to any services which might be running on the computer without the user's knowledge, whether due to legitimate services being misconfigured, or the presence of malicious software.

How do I unblock port 80 in Apache?

Go to the Control Panel and launch "Windows Firewall" Go to "Advanced Settings" Select "Inbound Rules" in the left pane Select "New Rule" in the right pane In the New Inbound Rule Wizard, select "Port" as Rule Type, then click on "Next" Select "TCP and put "80" (and any other ports you want to open) in "Specific local ...


1 Answers

Setting up the proxy

To set up a reverse-proxy with Apache2, you first need to enable the Apache proxy module and virtualhosts. To enable the proxy module (mod_proxy), edit the Apache configuration file (Apache/conf/httpd.conf) and uncomment the following lines:

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule unique_id_module modules/mod_unique_id.so 

You then need to enable VirtualHosts. To do this, just uncomment the following line from the same configuration file:

Include conf/extra/httpd-vhosts.conf 

Finally, you need to edit Apache/conf/extra/httpd-vhosts.conf and write in it the proxy directives. From the information you gave, they should look like this:

<VirtualHost *:80>   ServerAdmin ******   DocumentRoot "******"   ServerName *****    ProxyRequests Off   ProxyVia Off    ProxyPass /couch/ http://127.0.0.1:5984/   ProxyPassReverse /couch/ http://127.0.0.1:5984/ </VirtualHost> 

(+ some mLog directives and a few others).

-> Apache restart -> profit.

Learning Apache

You should have a look at the official documentation on the Apache official website or Apachetutor.org, though Google is, and always will be, everyone's friend.

like image 93
Nicolas BRERO Avatar answered Oct 14 '22 21:10

Nicolas BRERO