Fresh CentOS5, PHP, mySQL Install, but Cant Pull up Localhost in Web browser.
Linux - NewbieThis 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
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.
Fresh CentOS5, PHP, mySQL Install, but Cant Pull up Localhost in Web browser.
Hey all, new to linux today. Wanting to learn it in order to have more control over my dedicated server and at some point get rid of Server Management Company.
So I installed CentOS5.4, Apache, PHP, mysql from repositories. Then according to tutorial i should have created a file index.php with the following in it: <? phpinfo(); ?> so in VMWare I did this:
did ifconfig and a few addresses come up:
lo inet addr: 127.0.0.1
virbr0 inet addr: 192.168.122.1 Bcast: 192.168.122.255
tried all of those and nothing.
also tried the subnet ip address that shows up in vmware edit menu.
All these things and no php info page coming up. Not sure what i've done wrong any hints as to which direction to go in order to find out whats not working would help greatly.
Thanks.
Last edited by hungry4knowhow; 04-16-2010 at 01:28 AM.
Well you should put that file in /var/www/html. Can you see the difference?
And make sure your apache server is running and listening. service httpd start should start the service.
I'm pretty sure my typing of /var/html/www was a typo and I have it in the correct directory, however I do not know how to confirm this.
Also, service httpd start was completed before, and i had Issues then when I entered the ip's and localhost it didnt even bring up Apache Test Page all this prior to creating the index.php
Thanks for the continuing help! I've googled and searched but as I am new to Linux im sure im not using the correct terminology and have come up with nothing
Also wanted to edit to add that it is CentOS 5.4
Last edited by hungry4knowhow; 04-16-2010 at 01:28 AM.
If your apache is setup correctly and is up and running, you should get the apache default start page. And if you are unable to see the page, you should first setup your apache first. And then host the pages. It should not be too difficult though if you have used yum to install everything. It should already be configured.
Hey all, new to linux today. Wanting to learn it in order to have more control over my dedicated server and at some point get rid of Server Management Company.
So I installed CentOS5.4, Apache, PHP, mysql from repositories. Then according to tutorial i should have created a file index.php with the following in it: <? phpinfo(); ?> so in VMWare I did this:
did ifconfig and a few addresses come up:
lo inet addr: 127.0.0.1
virbr0 inet addr: 192.168.122.1 Bcast: 192.168.122.255
tried all of those and nothing.
also tried the subnet ip address that shows up in vmware edit menu.
All these things and no php info page coming up. Not sure what i've done wrong any hints as to which direction to go in order to find out whats not working would help greatly.
Thanks.
Open the /etc/httpd/conf/httpd.conf, search for the line:
ok so i've figured out how to get into httpd.conf and find ServerName field edit and save via nano, now my question is I have a ton of different IP like numbers I get from different places. Which IP do I use when running ifconfig from the centos command line?
Last edited by hungry4knowhow; 04-16-2010 at 11:29 PM.
Ok so after a bit of reasoning this morning, I realize that I had the right IP, but when I went to port forwarding website it said my port 80 is not open. And that many residential ISP's block this port.
Yes, you need to use a service such a DynDns to redirect port 80 requests to another port such as 8080 and have your server listen on port 8080. My advice to you is to stick with server management company until you have acquired sufficient knowledge to safely deploy a secure server on the internet. Start by setting up an internal one and make your mistakes in private.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.