LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2012, 02:34 AM   #1
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Rep: Reputation: Disabled
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.
 
Old 10-01-2012, 03:30 AM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
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
 
Old 10-01-2012, 04:15 AM   #3
_dkode_
LQ Newbie
 
Registered: Sep 2012
Location: kerala
Distribution: debian
Posts: 11

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

do you have any reason for the duplicate post?
 
Old 10-01-2012, 04:21 AM   #4
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-01-2012, 09:02 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
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
 
Old 10-03-2012, 01:01 AM   #6
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-03-2012, 02:03 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mv compress the apache log without stopping apache server jayakumar01 Linux - Server 1 06-25-2012 04:42 AM
Apache close wait error :Apache stop responding,Server get hangs jsaravana87 Linux - Server 1 06-19-2012 12:49 PM
how to start mysql server & apache server at startup and then tomcat at last at boot sanjay87 Linux - Server 5 06-16-2012 09:19 AM
Tomcat Apache on Apache Web Server? carlosinfl Linux - Server 6 04-27-2012 06:12 AM
apache server redirecting to apache.org? exley Linux - Software 1 03-13-2006 02:02 AM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration