LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Setting up a web server (https://www.linuxquestions.org/questions/mandriva-30/setting-up-a-web-server-252756/)

Spyiish 11-09-2004 06:48 AM

Setting up a web server
 
Hi all,

I installed mandrake today, and happy about it. I wanna install and set up my own web server. I know it does it automatically, but how do I show it to other ppl (outside world) with my ip address?

Also, I have already port forward my local ip address to the real ip address that my isp generates. Whenever my friend tried to http my ip address, it doesnt work.

What is wrong, and what have I done wrong? Someone please tell me.

Cheers,
Spyiish

acid_kewpie 11-09-2004 06:57 AM

you've really not told us much about what you've done, only loosely describe what you think you've tried to do... Please explain this port forwarding, and your lan in general.

opjose 11-09-2004 07:56 AM

Your Linux box has it's own "private" IP address which your router must forward to.

Test the ip address from another computer, or from Linux itself by giving it directly...

e.g. using any browser

http://192.168.0.201

If Linux does not answer queries (no web page) then you probably do not have the server configuration properly set up yet.

You may want to start by installing webmin and the wizards...

e.g.

urpmi webmin
urpmi wizards

The wizards enhance the MCC permitting you to set things up there.

But the real "beauty" is webmin which will take care of dealing with your installed servers and services.

It is access by first starting the service(s)

service start httpd
service start webmin


then in a browser

https://192.168.0.201:10000

substituting your machine's IP address.

Note: Mozilla works better than Konqueror for this

Spyiish 11-09-2004 08:04 AM

Where do you find the apache directory?

How do I configure httpd.conf files or similar?

Spyiish 11-09-2004 08:07 AM

BTW, how do u know whether your web server is working or not?

opjose 11-09-2004 08:12 AM

"BTW, how do u know whether your web server is working or not?"

By doing what I posted...


"Your Linux box has it's own "private" IP address which your router must forward to.

Test the ip address from another computer, or from Linux itself by giving it directly...


e.g. using any browser

http://192.168.0.201

If Linux does not answer queries (no web page) then you probably do not have the server configuration properly set up yet."


"Where do you find the apache directory?"

It's in /var/lib/httpd


"How do I configure httpd.conf files or similar?"

Using either the wizards or better still webmin.

Webmin gives you an http based configuration interface for things on your machine.

But it will also automatically go out and configure any modules, etc. you may want or already have added, and set up permissions, directories, virtual web pages, etc.

Spyiish 11-09-2004 09:21 AM

Quote:

Originally posted by opjose
"BTW, how do u know whether your web server is working or not?"

By doing what I posted...


"Your Linux box has it's own "private" IP address which your router must forward to.

Test the ip address from another computer, or from Linux itself by giving it directly...


e.g. using any browser

http://192.168.0.201

If Linux does not answer queries (no web page) then you probably do not have the server configuration properly set up yet."


"Where do you find the apache directory?"

It's in /var/lib/httpd


"How do I configure httpd.conf files or similar?"

Using either the wizards or better still webmin.

Webmin gives you an http based configuration interface for things on your machine.

But it will also automatically go out and configure any modules, etc. you may want or already have added, and set up permissions, directories, virtual web pages, etc.


My web server works. When I typed in http://localhost or http://ipaddress - it shows my webpage. However, when my friend tried to access my web page with the ip address randomly generate the ip address, it doesnt work. How do I make it work so that anyone outside can see my web page?

By the way, httpd is not found in /var/lib

akilles 11-09-2004 09:32 AM

Then what you need is:
Your router/gateway must forward all request on port 80 to the internal IPadress of your server.
(It's stated in earlier posts also.)
-Akilles

akilles 11-09-2004 09:34 AM

Also:
httpd.conf could be located: /etc/apache/httpd.conf
Don't know how relevant that is, but that's where it's located on my server.

Spyiish 11-09-2004 09:39 AM

Hmm, yer i know,but u're using slackware tho, I used to use slackware (its too hard for me, so I changed it to mandrake). I know that location /etc/apache, but for mandrake is different.

By the way, how did u get web server working with slackware? I tried it many times, but it doesnt seem to work. :(

Im not having a good week.

akilles 11-09-2004 09:54 AM

My server at home is running Slackware 9.0
Setting up a webserver was very easy. Even for me who then had almost no experience in Linux.
After that I've installed and running BIND for DNS, Postfix and Courier-IMAP
I just installed apache from downloaded source, edited a few lines in httpd.conf executed apachectl start, and were up and running.

Spyiish 11-09-2004 09:57 AM

Damn, nice man..... hey, if i reinstalled slackware 10, do u think u'll be able to help me get my server up and running?

By the way, have u got ftp server and mail server running too?

akilles 11-09-2004 12:46 PM

For FTP I only use what is standard, nothing more. But FTP is running yes, I use FTP to upload web pages.
I can help you to the best of my knowledge. I have no official training in Linunx, but I work with computers professionally.
Feel free to add me to MSN(if you use it), or drop me a mail. (The adress I use for both is shown in my signature).
I'm on MSN at all times between 09:00 AM and 04:00 PM local time in Norway. (GMT +1)

akilles 11-09-2004 12:48 PM

Forgot to mention mailserver.
Yes, it's up and running with no problem. I use Postfix as my MTA, and Courier-IMAP to let clients connect.

opjose 11-09-2004 07:50 PM

Quote:

Originally posted by Spyiish
Damn, nice man..... hey, if i reinstalled slackware 10, do u think u'll be able to help me get my server up and running?

By the way, have u got ftp server and mail server running too?

Eh, from what you stated above IT'S ALREADY RUNNING PROPERLY.

The problem you are having is port forwarding the requests from the internet into your machine via your external router.

Once you have this configured correctly (this has nothing to do with Linux BTW) then people will be able to pull up the same thing you see via IP address just as you did.

Start there.

AFTER they can see your web page, consider registering it if you have a fixed IP or use a (free) service such as dyndns.org to deal with an ISP that only gives you dynamic IP's.

If you can get to this point, the rest is almost trivial in Linux as Mandrake supplies a bunch of wizards that do all the work with a single click.


All times are GMT -5. The time now is 07:54 PM.