LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-24-2005, 01:53 PM   #1
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Rep: Reputation: 15
Web / FTP Server Help


Hi

I've looked around but as I'm quite new to all this, nothing seems to make much sense. So I will put what I've done, what I want and whats happening. Any help is greatly appreciated!

I installed apache2 and edited the conf file to point to /root/smsfrancis/ in two places and changed another setting to All - following a website tutorial. Went to http://localhost/ and saw the correct apache screen.

Put files into this from my website and tried again, it now lists the files of my website.

I signed up to www.dyndns.org and got the dynamic dns smsfrancis.homeftp.net and changed my router settings to forward the ports for http and ftp onto the network ip of the computer (192.168.0.3). The trouble is that I can not get to my webpage using either the dyndns address or my ip address, both lead me to the routerlogin page (192.168.0.1). Which is great if I want to edit my router from somewhere else... but isnt exactly what I wanted.

I want to be able to host my website off of this computer, what do i need to change to make it use the right files and display my website?

Also, I registered the domain www.smsfrancis.co.uk via 123-hosting.co.uk and the package has run out recently and I dnt want to pay for another year of hosting. How do I then get the www.smsfrancis.co.uk name to connect to the files on my computer and serve them out?

Final step is that I want to assign a folder to ftp so that I can put files in here and people can access them for download. How?

I'm using the latest Slackware version and have used the latest apache and gFTP so far.
 
Old 10-24-2005, 04:54 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
Quote:
Put files into this from my website and tried again, it now lists the files of my website.
what is the name of your 'index' file in htdocs?... probably index.htm(l), try changing it to index.html.en --- note that there is a way to identify uniquely named index files in apache config... look it up.

Quote:
I signed up to www.dyndns.org and got the dynamic dns smsfrancis.homeftp.net and changed my router settings to forward the ports for http and ftp onto the network ip of the computer (192.168.0.3). The trouble is that I can not get to my webpage using either the dyndns address or my ip address, both lead me to the routerlogin page (192.168.0.1). Which is great if I want to edit my router from somewhere else... but isnt exactly what I wanted.
how are you updating your IP addr to dyndns? are you sure it's working (log file?)

Quote:
Also, I registered the domain www.smsfrancis.co.uk via 123-hosting.co.uk and the package has run out recently and I dnt want to pay for another year of hosting. How do I then get the www.smsfrancis.co.uk name to connect to the files on my computer and serve them out?
you can't, you don't own it anymore. and thus you cannot have their DNS servers redirect to your IP address.

cheers
 
Old 10-24-2005, 05:04 PM   #3
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Re: Web / FTP Server Help

Quote:
Originally posted by NeoNero
Hi

I signed up to www.dyndns.org and got the dynamic dns smsfrancis.homeftp.net and changed my router settings to forward the ports for http and ftp onto the network ip of the computer (192.168.0.3). The trouble is that I can not get to my webpage using either the dyndns address or my ip address, both lead me to the routerlogin page (192.168.0.1). Which is great if I want to edit my router from somewhere else... but isnt exactly what I wanted.

I want to be able to host my website off of this computer, what do i need to change to make it use the right files and display my website?
Your router isn't actually forwarding the HTTP port (port 80) through to your server. Since you can view your Website the server is fine, and it's likely to a be an error in the router setup.

Quote:

Also, I registered the domain www.smsfrancis.co.uk via 123-hosting.co.uk and the package has run out recently and I dnt want to pay for another year of hosting. How do I then get the www.smsfrancis.co.uk name to connect to the files on my computer and serve them out?
Depending on your contract, you may find that the hosting company own the domain name that you registered, and you were effectively leasing it from them (this is standard for low-cost packages). They may well have a policy on transferring domain names - it'll probably involve an admin fee.

Quote:

Final step is that I want to assign a folder to ftp so that I can put files in here and people can access them for download. How?
You don't really need FTP for regular downloads, as HTTP serves out any type of file. Using the Apache server is also safer than an FTP service. Setup a directory with no index.html file and by default Apache will show a list of the files in that directory instead - users can then click on the name of the file that they want and their browser will download it.
 
Old 10-24-2005, 06:22 PM   #4
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
Thank you for your replies.

I guess I am pretty stumped on the router setup. Last night I set up a working FTP server on my gf's computer at her home using this same method of dyndns and port forwarding. Her router is the same (both Netgear) apart from it being for NTL and mine is for BT.

On hers, it clearly stated "Port forwarding" in the menu but on my model (which looks identical from the outside), you go into Firewall Rules and then "Inbound Services" which I've set in a similar way:

Service: HTTP(TCP:80)
ACtion: Allow always
Send to LAN Server: 192.168.0.3
Log: Always

There is also an Outbound Services section that I hadnt set until just a moment ago and now has the same settings as Inbound. Yet still when I go to http://smsfrancis.homeftp.net it takes me to the router login page (192.168.0.1)


Dyndns is being updated from the router as there is a Dynamic DNS menu option:

Service Provider: www.DynDNS.org
Host Name: smsfrancis.homeftp.net
<username/password also provided here>

My router is a Netgear Wireless ADSL Firewall Router DG834G with the latest firmware and is pretty new itself anyway. Any help on what I'm missing?





As an aside, I changed the file name to .html and it appears perfectly on http://192.168.0.3 So will have to do some editing of the files in Dreamweaver or Notepad....

And the tip to just use HTTP hadnt actually crossed my mind for some reason even though I'm often asked whether I want to download via HTTP or FTP! Though wouldnt I want to secure it more thoroughly with usernames and the like with FTP?

Last edited by NeoNero; 10-24-2005 at 06:30 PM.
 
Old 10-24-2005, 06:39 PM   #5
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Quote:
Originally posted by NeoNero
There is also an Outbound Services section that I hadnt set until just a moment ago and now has the same settings as Inbound. Yet still when I go to http://smsfrancis.homeftp.net it takes me to the router login page (192.168.0.1)
FWIW, the link works for me .

Quote:

And the tip to just use HTTP hadnt actually crossed my mind for some reason even though I'm often asked whether I want to download via HTTP or FTP! Though wouldnt I want to secure it more thoroughly with usernames and the like with FTP?
You can setup usernames and passwords, and also encrypt the connection by using SSL (FTP sends passwords etc. unencrypted). Apache ships with a huge amount of documentation that goes in the /manual subdirectory, so that you can read it from your Web server, and is also available on online at http://httpd.apache.org/ - well worth glancing through.
 
Old 10-24-2005, 06:41 PM   #6
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
It works for you how? Takes you to my website or to my router login?
 
Old 10-24-2005, 07:35 PM   #7
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
I see your Website.
 
Old 10-24-2005, 07:53 PM   #8
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
I see it too.... nice geckos
 
Old 10-24-2005, 11:11 PM   #9
NoStop
Member
 
Registered: Feb 2005
Location: Canada
Distribution: Debian Etch - Enlightenment E17
Posts: 116

Rep: Reputation: 15
Quote:
Originally posted by NeoNero
It works for you how? Takes you to my website or to my router login?
Works for me also. Get to your website. I'm guessing that on your computer you have entered something like this in the hosts file:

192.168.0.1 smsfrancis.homeftp.net

and that is what is causing YOUR computer to go to your router admin instead of the website. If that is indeed the case, remove that line from your hosts file.

Cheers.
 
Old 10-25-2005, 03:53 AM   #10
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
Well, that IS strange! Glad you can all see it, and that my new web server was actually serving web pages last night!

But sorry I dont get "host file", where exactly am I going to change this? I dnt remember setting anything to that... so pls point me in the right direction!
 
Old 10-25-2005, 01:45 PM   #11
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
Another question, are there any tools for administrating the website? Such as seeing who visits it and things like this, loading times, etc, anything useful?

I've only got this thing up as a play around and to save some money on hosting while learning Linux.. so any new things are appreciated.
 
Old 10-25-2005, 02:11 PM   #12
Ynot Irucrem
Member
 
Registered: Apr 2005
Location: Perth, Western Australia
Distribution: Debian
Posts: 233

Rep: Reputation: 30
Quote:
But sorry I dont get "host file", where exactly am I going to change this?
the file is /etc/hosts
Quote:
are there any tools for administrating the website? Such as seeing who visits it and things like this, loading times, etc, anything useful?
there are lots of scripts like that available free all over the net, such as at http://www.resourceindex.com and http://www.hotscripts.com. To use any of them you will need some sort of scripting engine on your web server, like perl or php.
 
Old 10-25-2005, 02:28 PM   #13
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
Just looked in /etc/hosts and the only uncommented lines are:

127.0.0.1 localhost
127.0.0.1 linux.domain linux

This isnt what you said there might be in this file causing it to show me the wrong page from my own pc, so any other thoughts?




Thanks for the info on scripts, I guess php/perl will be the next thing I learn then.. at least in some basic form of how to put it on the server. I also came across awstats in my own searches, any one have any experience of this?

http://awstats.sourceforge.net
 
Old 10-25-2005, 06:13 PM   #14
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
I've added "BBClone" to count hits and other stats, but am having some trouble with Apache. Wondered if you could help!

I need to have a .htaccess file in the website root containing the following:

Quote:
AddType application/x-httpd-php .htm .html
<FilesMatch "\.(html?)$"> php_value short_open_tag "Off"
php_value auto_append_file "/the/path/that/leads/to/count.php"
</FilesMatch>
This makes the apache look through each htm/html file for php code in order for the stats to be counted and built up. Unfortunately, adding this self-made .htaccess file to the webroot causes the pages not to load with an "internal server error". As soon as it is renamed or removed, they work again.

How can I configure apache to allow this file to be here without stopping the pages working? As i need it here to count pages in this part of the structure and any subfolders (it has to be at the top of the tree).




P.S: The problem of not being able to access the site via the web on http://smsfrancis.homeftp.org is still active and I'd really like to solve this one if you can help.

Last edited by NeoNero; 10-25-2005 at 06:29 PM.
 
Old 10-25-2005, 10:02 PM   #15
NoStop
Member
 
Registered: Feb 2005
Location: Canada
Distribution: Debian Etch - Enlightenment E17
Posts: 116

Rep: Reputation: 15
Quote:
Originally posted by NeoNero
Another question, are there any tools for administrating the website? Such as seeing who visits it and things like this, loading times, etc, anything useful?

I've only got this thing up as a play around and to save some money on hosting while learning Linux.. so any new things are appreciated.
Webalizer is the premium logging tool for apache websites. It'll count the visits, graph them, etc.

Cheers.
 
  


Reply



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
Ftp(through web site access to ftp server) kelper Linux - Software 4 07-03-2015 05:14 PM
setup mailserver/web server/ftp server hariiyer Linux - Networking 1 11-27-2004 01:16 AM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 03:09 AM
what about ftp and web server Fuel Slackware 1 04-17-2002 09:25 AM

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

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