LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Server (https://www.linuxquestions.org/questions/linux-newbie-8/apache-server-4175429821/)

piyushsingh 10-01-2012 01:34 AM

Apache Server
 
helo guys..

i want to run an apache server can be accessed by anyone.ihave made an apache sevre which is running locally.i have public ip 59.177.x.x now what is should do.
should i bind my public ip to my linux machine's physical address.cause i have done port forwarding to internel ip but this is not workin..
any help will be appreciated .
please help me guys.

jsaravana87 10-01-2012 02:30 AM

Hi

Alaborate thing what you want to achive .To my understanding whether you have to reach internal apache server using port forwarding using your static ipaddres 59.177.x.x.If not alaborate the thing ? where do you fail ? what the logs says you ? .If you post these thing its easy for other to help you



If you want to reach internal apache server using port forwarding try these

ssh 9580:localip:80 root@59.177.x.x

_dkode_ 10-01-2012 03:15 AM

This seems to be same issue here
http://www.linuxquestions.org/questi...ly-4175429061/

do you have any reason for the duplicate post?

piyushsingh 10-01-2012 03:21 AM

i just want to say that i have configured Apache server which is accessible locally.as i have told my public ip is 59.177.x.x but system takes 192.168.1.3 thats why i m syaing that should i bind my public ip 59.177.x.x with linux machin's physical Address(Mac Address)...

please reply me

deep27ak 10-01-2012 08:02 AM

I don't know if I get you completely

So you have configured web server on some local private IP and you want it accessible on your public IP worldwide
If this is the case then you need two things

1. NAT your private IP to your public IP using iptables
2. Make sure you have a registered domain name pointing to your public IP or else all the clients will have to use the public IP every time they want to access your web server

piyushsingh 10-03-2012 12:01 AM

i have not registered domin..i want to access it through my public ip.....tell me the ip tables rule which i have to apply..
my public ip is "59.177.X.X"
my linux machine takes "192.168.X.X"
i have made Aapche server on port 8080

deep27ak 10-03-2012 01:03 AM

This action has to be performed on the router
Check all other rules in NAT for any other rule conflicts

Code:

# iptales -L -t nat
Code:

# iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.x.x -d 59.177.x.x


All times are GMT -5. The time now is 07:20 AM.