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 11-30-2004, 11:06 AM   #1
Ruben2
Member
 
Registered: Sep 2004
Location: Lelystad, NL
Distribution: Debian Etch
Posts: 123

Rep: Reputation: 15
Question My own server


Hey,
I want to make my own server cause I learning php now and there almost isn't any server that supports php (and mysql or oracle).
But I've a problem, I don't know how to! (yes, I know I'm a )
I've a ADSL modem, a router and 2 computers. Where do I have to place the server? after the modem, after the router or even before the modem?
And when I have placed it at the good place, what do I've to do to let others access my site? What do I've to install (I guess it's not only apache that I've to install) and what do I have to do more?
Please help me.
Ruben
 
Old 11-30-2004, 11:18 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
How would your server connect if its before the modem??

ADSL Modem > Router > Computers (Server)

Go in that order. Setup your server and then from your router you'll need to forward any ports it will be listening on to your server, like port 80 for html or www (apache).

You'll definitely need php and apache installed (at least those I would recommend for serving up php pages). You might also want to install a database like mysql, since alot of php depends on database backends for learning, setting up online applications/pages, etc.

And you'll also probably want to register a domain name, you certainly don't want to have all your friends remember your IP address to get to your site. And if that's the case, you'll also need to setup a DNS server along with it, either on the same server or a different one, so your IP resolves to a name, etc.

I'd suggest reading some more on serving up websites, setting up DNS, domain names, etc.... before starting php, there's so much more in just setting up a server than just jumping right in to learn php or any other web based program language. You'll also want to learn about firewalls and security along with all of this to protect your site, etc.

Regards and good luck! If you run into any detailed questions you can't find answers to, feel free to ask here.
 
Old 11-30-2004, 11:30 AM   #3
Ruben2
Member
 
Registered: Sep 2004
Location: Lelystad, NL
Distribution: Debian Etch
Posts: 123

Original Poster
Rep: Reputation: 15
Thanks for the reaction,
but I've two other questions:
When I have my ip (from www.whatismyip.com), and I use it, I login at my modem configuration. But when others (e.g. friends) do this, they get the message that the page isn't found. I know that my internal ip of my modem (so the one via the network) is different. What's the problem? or is this only a problem cause I've no server?

Second question:
What's a good tut to learn, I find a lot whit google. But I maybe does some of you know wich one is realy good one.

Thanks
Ruben
 
Old 11-30-2004, 12:07 PM   #4
halo14
Senior Member
 
Registered: Apr 2004
Location: Surprise, AZ
Distribution: Debian | CentOS | Arch
Posts: 1,103

Rep: Reputation: 45
This is because your modem configuration is web based and listens on port 80 by default... and it also has external access disabled... So think about this logically...

Your modem/router is using 2 IP addresses... internal/external... internal is probbaly something like 192.168.1.1 and the external can be any number..

You need to go into your router configuration and set it to listen on a different port.. (port 81 perhaps?) and then set port forwarding for port 80 to the internal (static) ip address of the box which will be your server. Let me try to draw this out...

[INTERNET]
|:::::::::::|
[Modem/Router] (most simple home routers also have a built in 4-port switch which is what you connect standard computers to.)
|:::::::::::|
|::::| |::::|
[Desktop][Server]

I don't know how well that works... lol.. but connect your server just as your regular desktop computer, and give it a static IP, something like 192.168.0.10 or whatever you wish.. so long as it complies with the subnet...

Now do an install of whatever OS you wish to use for the server... If you want to be serious about hosting a real website, I recommend $70 for Red Hat Professioanl Workstation (which is ACTUALLY RHEL 3 WS) which includes all Red Hat updates and Apache 2.0 and PHP and MySQL, and everything.. or if you just want to learn how to set it up.. use whatever you want... Fedora, SuSE, Debian, Slackware... the choice is yours... If you do a Red Hat install and select all the stuff from the installation process (Apache, PHP, MySQL) it will install it all together for you, so you wont have to add the PHP modules to your httpd.conf file.

after you get it installed, go into you main www directory... generally /var/www and create a file something like "phptest.php" and include the following:
Code:
<?php
    phpinfo();
?>
and then view that folder through apache... "http://localhost/phptest.php" and you should get a huge listing of how PHP is configured for your system. Look for a section on "MySQL" if it's there, than you have Apache, PHP, and MySQL all installed and working together... the next step is to set up your site... and get yourself a snazzy message board like this...or for a free one.. go to phpbb.com

Good luck
 
Old 11-30-2004, 06:20 PM   #5
floppywhopper
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Mageia , Centos
Posts: 643
Blog Entries: 2

Rep: Reputation: 136Reputation: 136
vist this site for starters

http://www.oreilly.com/catalog/linag2/book/index.html

and is this the sort of setup you want ( check diagram ) ??

http://www.ipcop.org/1.4.0/en/instal...iguration.html

plenty of how-tos at

http://www.tldp.org/

http://www.linuxdocs.org/

http://www.faqs.org/docs/

live long and prosper
floppy
 
Old 12-01-2004, 07:19 AM   #6
Ruben2
Member
 
Registered: Sep 2004
Location: Lelystad, NL
Distribution: Debian Etch
Posts: 123

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by floppywhopper

and is this the sort of setup you want ( check diagram ) ??

http://www.ipcop.org/1.4.0/en/instal...iguration.html
Thanks for your reactions,
I want it almost like the one named GREEN. I shall try to give a good view of how I want it:
/->PC
ADSL modem -> Router/hub (one machine) ->PC
\->Server

But I'll check your links and try to make a server in the vacation. If I don't know something at that moment I'll aks again. Thank for now
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 09:18 PM
Relay Server<-> GatewayServer<->filtering server: PostFix, amavis,spamassassin, cyrus admore Linux - General 0 11-02-2004 08:46 AM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
Linux app-server to server StarOffice to Windows Clients: Need advice biosx Linux - Networking 3 08-14-2002 10:14 AM

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

All times are GMT -5. The time now is 12:04 PM.

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