LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Setting a web page with php! (https://www.linuxquestions.org/questions/linux-general-1/setting-a-web-page-with-php-75884/)

mithras 07-25-2003 01:10 PM

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 :)

mithras 07-25-2003 01:12 PM

Please Help me :(

Half_Elf 07-25-2003 01:24 PM

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?

mithras 07-25-2003 01:26 PM

Not sure, how can I check, and if don't how can I compile it. Thanks :)

Proud 07-25-2003 01:34 PM

Isnt that a private ip addy, eg only valid on your LAN?

mithras 07-25-2003 01:40 PM

? 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 :)

david_ross 07-25-2003 01:44 PM

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?

mithras 07-25-2003 01:48 PM

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 :)

Proud 07-25-2003 01:51 PM

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.

david_ross 07-25-2003 01:52 PM

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.

mithras 07-25-2003 02:03 PM

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

mithras 07-25-2003 02:06 PM

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.

david_ross 07-25-2003 02:14 PM

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.

zaphod_es 07-25-2003 03:19 PM

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

mithras 07-25-2003 03:25 PM

Thank you very much I'll considerate that :)


All times are GMT -5. The time now is 10:29 PM.