Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372
Rep:
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.
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.
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?
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.
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.
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!
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.