LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Web / FTP Server Help (https://www.linuxquestions.org/questions/linux-newbie-8/web-ftp-server-help-376448/)

NeoNero 10-24-2005 01:53 PM

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.

nilleso 10-24-2005 04:54 PM

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

hob 10-24-2005 05:04 PM

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.

NeoNero 10-24-2005 06:22 PM

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

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! :o Though wouldnt I want to secure it more thoroughly with usernames and the like with FTP?

hob 10-24-2005 06:39 PM

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! :o 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.

NeoNero 10-24-2005 06:41 PM

It works for you how? Takes you to my website or to my router login?

hob 10-24-2005 07:35 PM

I see your Website.

nilleso 10-24-2005 07:53 PM

I see it too.... nice geckos :p

NoStop 10-24-2005 11:11 PM

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.

NeoNero 10-25-2005 03:53 AM

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!

NeoNero 10-25-2005 01:45 PM

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.

Ynot Irucrem 10-25-2005 02:11 PM

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.

NeoNero 10-25-2005 02:28 PM

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

NeoNero 10-25-2005 06:13 PM

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.

NoStop 10-25-2005 10:02 PM

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.


All times are GMT -5. The time now is 07:01 AM.