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-14-2008, 05:09 AM   #1
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Rep: Reputation: 15
Question LAMP access over the internet (IP as my URL)


Hi guys
I have installed LAMP.
I do have a static IP.
I need to know how to set it up some how that it is possible for others to see my site.
(Iv seen it being done, with the URL being the IP of the computer)
Thank u all in advance
 
Old 10-14-2008, 05:16 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
do you mean putting

http://222.333.444.555

in your browser, or do you want to know how to register a domain?
 
Old 10-14-2008, 05:20 AM   #3
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
I mean putting my IP in the url.
like http://xxx.xxx.xxx/
 
Old 10-14-2008, 05:24 AM   #4
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 120

Rep: Reputation: 21
People on your intranet/network can access your LAMP website by typing the IP address of your computer in the browser.
Code:
Eg. "http://192.168.0.4/Website" // where 192.168.0.4 is your IP address 
            //& Website is the folder under your Document root
You will have to configure DNS on your computer if you want to access your site with a name (domain name) instead of your ip address.
 
Old 10-14-2008, 05:45 AM   #5
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
i tried what u said but i could access the site through another computer over internet.
i tried http://78.146.17.225/index.html
but the browser said page not found.
 
Old 10-14-2008, 06:25 AM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It isn't reachable (if that' your IP).

Check

netstat -nalp | grep :80

to see if it's listening, and your firewall
 
Old 10-14-2008, 06:54 AM   #7
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
It isn't reachable (if that' your IP).

Check

netstat -nalp | grep :80

to see if it's listening, and your firewall
sorry, i have no idea what i should be looking for and how.

but here is the result of netstat -nalp | grep :80
Code:
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.2.107:45985     62.24.131.32:80         TIME_WAIT   -               
tcp        0      0 192.168.2.107:60282     74.125.4.36:80          ESTABLISHED 5671/firefox    
tcp        0      0 192.168.2.107:56704     62.24.131.10:80         TIME_WAIT   -               
tcp        0      0 192.168.2.107:56371     62.24.131.10:80         ESTABLISHED 5671/firefox    
tcp6       0      0 :::80                   :::*                    LISTEN      -
 
Old 10-15-2008, 08:50 PM   #8
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
erm any1?

so there is no1 that knows how to host a site with IP address instead of a host name.
( I cant afford a DNS)
 
Old 10-15-2008, 08:57 PM   #9
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What's the IP, is it 78.146.17.225?

If this IP on a router, is port 80 forwarded to your server? If not, where is the IP?

Did you check your firewall?

What distro do you use?

The issues you are having are nothing to do with the fact you're using and IP rather than a name. Your LAMP setup simply isn't right.
 
Old 10-15-2008, 11:38 PM   #10
geek745
Member
 
Registered: Jul 2004
Location: Boston, MA
Distribution: Slackware; Ubuntu; Slax
Posts: 172
Blog Entries: 2

Rep: Reputation: 33
Yes, it is possible; you just need to configure port forwarding on your router to forward port 80 (http) to your linux computer. And you need to make sure that your linux computer's firewall is not blocking inbound traffic on port 80.
 
Old 10-17-2008, 03:00 AM   #11
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 120

Rep: Reputation: 21
Try these methods to access your site on your local computer:

Code:
http://localhost/        #will work if webserver is running & site is configured right
http://127.0.0.1/        #will work if webserver is running & site is configured right
http://xxx.xxx.xxx.xxx/ #Your IP Address here
If all the above methods work. Then your LAMP setup is fine. Your network is not configured right or firewall is preventing it. Try pinging your IP address from the other computer, if it does, then you can connect your webserver from that machine with your IP address.
 
Old 10-17-2008, 03:09 AM   #12
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Being able to ping does not imply that he'll be able to connect. ping does not operate on tcp.
 
Old 10-17-2008, 03:20 AM   #13
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
make sure your ip is not blocking in firewall rules

You can bind your ip in your webserver configuraion Listen variable

Listen xxx.xxx.xxx.xxx:80

Restart apache once .
 
Old 10-18-2008, 08:36 AM   #14
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
Thumbs up

hi guys thank you all.
it works not i needed to configure my router for port forwarding.
its all sorted now
 
  


Reply

Tags
ip, lamp


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
asinine url access question gdiv General 8 02-19-2007 05:35 PM
cannot access mod_status via url? asif2k Fedora 2 09-12-2006 03:27 PM
Squid- restrict access to url jocast Linux - Software 0 03-10-2006 02:59 PM
Unable to access tomcat, using ip in the URL MakingOfAGeek Linux - Newbie 0 11-14-2003 03:16 AM
Internet via IP, but not via URL? VictorN Linux - Newbie 7 08-30-2003 01:09 PM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration