LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-25-2003, 01:10 PM   #1
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Rep: Reputation: 15
Question Setting a web page with php!


Hello I have a server with redhat 8.0, qith the latest kernel installed and apache. I want to connect my web files to the internet. So far I have have got is this dynamic ip from my server: http://192.168.1.104/

Its says Hello World, because is a html page with the hello world in it. One problem is that I made a php file, but it only displays the text of the php but it doesn't run the script. What should I do?

Another thing is that I have buyed a domain name (Godaddy, cheap prices ) and want to setup my domain to point my dynamic ip, at this time, I will later buy a static ip.

Please Help me, thank you
 
Old 07-25-2003, 01:12 PM   #2
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
Please Help me
 
Old 07-25-2003, 01:24 PM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
were you really expecting an answer within 2 mins? There's 2 mins between your posts.
Whatever.. do you have apache compiled with PHP and php modules installed?
 
Old 07-25-2003, 01:26 PM   #4
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
Not sure, how can I check, and if don't how can I compile it. Thanks
 
Old 07-25-2003, 01:34 PM   #5
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Isnt that a private ip addy, eg only valid on your LAN?
 
Old 07-25-2003, 01:40 PM   #6
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
? Did you checked the address? I think is in my lan, don't know really, anyway can anyone explain me how to install the server, to view pages in the internet, or does anyone can recomend me a graphical manual to begin? Thank you very much
 
Old 07-25-2003, 01:44 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Take a look to see if php is installed:
rpm -qa | grep php

As for your IP - Proud is right it is on a frivate subnet and will not be visible on the net. How are you conncted to the internet?
 
Old 07-25-2003, 01:48 PM   #8
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
This is what it appears me when I typed waht you where asking to type for:

php-4.2.2-8.0.8
php-imap-4.2.2-8.0.8
php-ldap-4.2.2-8.0.8

I'm connected with a Lan. Thank you
 
Old 07-25-2003, 01:51 PM   #9
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Do you access the internet via a router or pc set up with a firewall? I'm quite sure that ip you gave is a network one, even though I've never set up a network. I've seen it about a lot.

The apache rpm for your RedHat install should set up the server to work from the off, though you may need to alter the firewall of the machine it's running on to allow it to be accessed. Also you need to check if your ISP allow such web servers to run, and if they block the default port 80 which they run on.
The manual for apache is very very detailed, as are the configuration files. Check httpd.apache.org, or the copies on your pc.
I dont use RedHat, but I think you can check the info about the apache rpm package to see if it mentions php being enabled.
 
Old 07-25-2003, 01:52 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
php is installed so take a look at:
/etc/httpd/conf/httpd.conf

And uncomment the AddType and LoadModule directives for php.

I guessed you were connected to LAN from your IP. But how is your LAN connected to th NET? You will need access to that gateway device to make your server visible.
 
Old 07-25-2003, 02:03 PM   #11
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
It is already uncommented. The house has a router, and it connects using cable on a windows platform, then the I plug in a cable to the router and plug it in my computer server with linux RH8
 
Old 07-25-2003, 02:06 PM   #12
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
How can I know my actual ip in the internet, I went to www.showmyip.com and it shows me this IP:

24.174.196.12

is this my ip of the internet? and when I tried to enter this ip, it asks me for a username and password. Im sorry for using your time, I will pay if neccessary Thank you.
 
Old 07-25-2003, 02:14 PM   #13
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
That is your ip. Chances are it is asking you for the username and password used to configuer your router. You will need to edit your router config and forward port 80 to the ip address of your server.
 
Old 07-25-2003, 03:19 PM   #14
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 137

Rep: Reputation: 15
I really hate people who tell beginners to rtfm. On the other hand you do have to do the background studying.

It is not a small thing to run a home web server on a local network using Linux and Apache. You need to know the basics of TCP/IP networking, IP addresses, DNS, routing, filters and firewalls .....and so on. this is without really considering security and all the bad guys who will try to wreck your site.

The first thing to do is become confident running Linux. Then get to grips with networking. Try running a web page on free space provided by your ISP. Then try hosting the page at home but without the fancy stuff like PHP. Then you will be ready to do what you are talking about.

O'Reilly do some great books on these subjects. Take a look at "Apache - The Definitive Guide". Google is your friend for learning about networking - it is all on the web, somewhere.

An answer to one of your specific questions:

Until you have a static IP you need a web redirection service like that at http://www.no-ip.com/ . There are plenty such services; again, try Google.

Good luck with the project
 
Old 07-25-2003, 03:25 PM   #15
mithras
Member
 
Registered: Jun 2003
Location: El Paso, TX
Posts: 45

Original Poster
Rep: Reputation: 15
Thank you very much I'll considerate that
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
drawing line in php on web page pranith Programming 6 06-21-2005 04:14 AM
setting up a php web server mrobertson Programming 4 06-02-2005 01:29 PM
Setting up a home web server with PHP, MySQL, and a mail client Kyle_D Linux - General 1 01-14-2005 01:52 AM
Setting up a web server for a single page? DrDoug Linux - Newbie 1 10-17-2004 11:21 AM
Jerky mouse when web browsers download web page stodge Linux - Software 1 07-08-2003 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:04 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