LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-23-2010, 02:23 PM   #1
ajlisowski
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
LAMP on vmware...


Hey all, I am brand new to linix. Im a programmer who is trying to learn a bit more about linix so I know what the heck im talking about when I request stuff from our IT guys...

Basically I have VMware installed and installed CentOS on it. I have set up apache, mysql and php. I tested this by making a phpinfo page. I then installed gnome and firefox, went to localhost and its good to go.

My problem is, how do I access this from outside of linix? I want my host windows PC to be able to hit up the php site on the centos machine.

I did a ifconfig and determined my IP address, and I went to that on my browser but it did not work. What am I missing?
 
Old 02-23-2010, 03:09 PM   #2
Rush_898
Member
 
Registered: Mar 2004
Distribution: debian...
Posts: 31

Rep: Reputation: 16
Hey dude, it sounds like (barring some other firewall problem or such) you need to tell apache to listen on the IP you are trying to connect on:

http://httpd.apache.org/docs/1.3/bind.html
 
Old 02-23-2010, 03:52 PM   #3
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Rep: Reputation: 16
I've worked with Oracle Enterprise manager (web based) and managed to handle it through the port forwarding if you use NAT for VMware image (your CentOS) networking. If it is "Bridged" networking then your vmware image has it's own IP which you reference in the URL address in a web browser outside of linux. I also feel that the /etc/hosts needs an entry of the machine name your are connecting from outside linux. Through in your Centos IP to the hosts file (google the location based on the client's OS) on the client if using "Bridged" networking on vmware.
 
Old 02-23-2010, 05:12 PM   #4
fusion1275
Member
 
Registered: Jul 2007
Location: Knaphill, Surrey
Distribution: Linux Mint
Posts: 310

Rep: Reputation: 36
BTW it's Linux not Linix
 
Old 02-24-2010, 09:23 AM   #5
ajlisowski
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Yeah..I...was typing Linix to make me seem like more of a noob so Id get pitty help?

I have no idea why I kept typing that

Anyway, so...this morning I go on my VM and now I cant even access localhost through the centos firefox. I also can not go to the IP address of the machine. I restarted apache and php is running fine. I have no idea why it suddenly broke more.

I DID disable and re-enable my firewall, so maybe that had something to do with it.

(actually it was an edit to my httpd.conf file that broke it, I changed that back and it works now)

The good news is disabling the firewall also allowed me to have access to the server from the host machine! So at least i know its the firewall stopping me

Last edited by ajlisowski; 02-24-2010 at 09:29 AM.
 
Old 02-24-2010, 09:48 AM   #6
deci007
Member
 
Registered: Sep 2007
Posts: 44

Rep: Reputation: 15
follow these step

I am assuming you are using this scenario for testing purpose.

this will figure out your ip address, make a backup of iptables files. and edit the iptables file so it can take traffic on port 80.

Code:
#ifconfig
#cp /etc/sysconfig/iptables /etc/sysconfig/iptables.old
#vi /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

#iptables -F                   ---this will clear the ports
#setenforce=0                  ---this will disable the selinux.

#chkconfig --level 345 httpd on  ---set the apache to start every time   you are at run level 3,4, and 5

#service httpd stop            ---stop the apache is running
#service httpd start           ---start the apache
this will be perfect for a testing environment. but not on production.
 
  


Reply



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
LXer: Enterprise LAMP Summit & Big LAMP Camp LXer Syndicated Linux News 0 09-21-2009 01:51 AM
Configuration to access internet from vmware(host=winXP, guest on vmware=linux-5) afz_linux Linux - Newbie 3 12-30-2008 12:20 AM
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 03:03 AM
LXer: LAMP vs. LAMP LXer Syndicated Linux News 0 08-22-2006 11:33 PM
LXer: Ubuntu LAMP Server With Torrentflux In VMware LXer Syndicated Linux News 0 08-10-2006 10:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 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
Open Source Consulting | Domain Registration