apache server with static ip can be access globaly
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
apache server with static ip can be access globaly
PLEASE HELP ME...I AM IN BIG TROUBLE...
I HAVE CONFIGURED APACHE SERVER IN RHEL 6 THAT CAN BE ACCESSED LOCALY I HAVE ISP.MY STATIC IP IS 59.177.X.X AND MY LINUX MACHINE TAKES 192.168.1.3 ..I WANT TO MAKE AN APACHE SERVER THAT CAN BE ACCESS GLOBALY ..PLZZ HELP ME.I HAVE ALSO DONE THIS FOR PORT FORWARDING
'iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080'.AND I HAVE ALSO CHANGED IN /etc/httpd/conf/httpd.conf LISTEN 8080.
please help me guys i am in big trouble.my mind is not working now
After DNAT Forwarded Packets to Apache must be allowed by the firewall
Code:
iptables -A FORWARD -p tcp -i eth0 -o eth1 -d 192.168.1.3 --dport 8080 --sport 1024:65535 -m state --state NEW -j ACCEPT
iptables -A FORWARD -t filter -o eth0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -t filter -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
I am assuming
Router's Eth0 is connected to Internet. Eth1 is connected to internal Network. Apache server is behind the Linux router running firewall.
IP for apache web server is 192.168.1.3
Quote:
i am in big trouble.my mind is not working now
Do not type in capital letters.If you are in big trouble then stop working on Linux Box immediately. Other wise you would be even in bigger trouble. Because your mind is not working and without working mind can you fix the issue? So take some time for rest. When the mind is not working in trouble it is even more important to stop working immediately and start thinking first. So let your mind work only start working after that.
Good luck
Last edited by KinnowGrower; 09-27-2012 at 10:30 PM.
you dont need to put port 8080 in url. http://59.177.x.x is sufficient. Most important is, you wont be able to do that from inside your network. To understand all this click this link Apache behind NATED firewall
Did it working locally? Show firewall rules as well
Last edited by KinnowGrower; 09-28-2012 at 05:39 PM.
Tell me what is it respond when you open only your static IP url that is http://59.177.x.x
Do you get the page saying "Apache 2 Test page"
This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page it means that the Apache HTTP server installed at this site is working proper.
Method -II
**********
Add following line in /etc/httpd/conf/httpd.conf
ServerName localhost
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.