LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-03-2010, 04:17 AM   #1
newtobuntu
LQ Newbie
 
Registered: Dec 2010
Distribution: OSX, ubuntu10.10
Posts: 6

Rep: Reputation: 0
seperate ftp and web server


i am in the process of setting up a dedicated home server and i would like to set it up to host a website and act as a ftp server. however, i would like them to be seperate from one another. ie) www.webserver.whatever to connect to the website with no ftp files then a different connection method for the file server and none of the website.

is this possible with one server?

so far i do not have anything configured just gathering info for the project.

also any advice on starting either server would be much appreciated!
 
Old 12-03-2010, 07:30 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,609

Rep: Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139
Quote:
Originally Posted by newtobuntu View Post
i am in the process of setting up a dedicated home server and i would like to set it up to host a website and act as a ftp server. however, i would like them to be seperate from one another. ie) www.webserver.whatever to connect to the website with no ftp files then a different connection method for the file server and none of the website.

is this possible with one server?

so far i do not have anything configured just gathering info for the project.
also any advice on starting either server would be much appreciated!
Yes, easily possible. Just make sure you turn off FTP/file/directory access in Apache so your web pages can't be used to browse your machine. Then run an FTP server. They'll each have their own port, and the two won't interact. Same as on any other kind of server..servers can run many services at once, easily.
 
1 members found this post helpful.
Old 12-04-2010, 08:12 AM   #3
newtobuntu
LQ Newbie
 
Registered: Dec 2010
Distribution: OSX, ubuntu10.10
Posts: 6

Original Poster
Rep: Reputation: 0
thank you very much for the answer.
it looks like i will be running apache2 for both server sections
i am thinking about dyn-dns to connect to the internet as i have a dynamic ip address

how should i set it up / get the tutorials on how to set up a 2 server in one station setup?
i am comfortable working in the command line and ubuntu server would be an acceptable route as it will be a dedicated server
however a gui environment would be just as viable if not more so
 
Old 12-04-2010, 08:45 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Since you are using Ubuntu, the Ubuntu Wiki pages would be a good source of information that is geared specifically for your distribution. You should also install your applications from the repository instead of trying to build from source when possible. The version in the repository has been configured to work with your distribution and will save you some trouble.
 
Old 12-05-2010, 04:42 AM   #5
newtobuntu
LQ Newbie
 
Registered: Dec 2010
Distribution: OSX, ubuntu10.10
Posts: 6

Original Poster
Rep: Reputation: 0
how do i have two addresses for a single machine, one to direct to the website one to direct to ftp over the web?
may be a simple question but im new to it all
 
Old 12-05-2010, 10:32 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,609

Rep: Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139Reputation: 8139
Quote:
Originally Posted by newtobuntu View Post
how do i have two addresses for a single machine, one to direct to the website one to direct to ftp over the web?
may be a simple question but im new to it all
You don't need two addresses. TCP/IP has 'ports'...each service uses a different port. So, web services typically respond on port 80, FTP on port 21. Think of it this way; you have a house with a street address. If you want to add another 'door', you don't need to buy a second house....you'd add it somewhere there wasn't already a door. Same address, different way in.
 
Old 12-06-2010, 07:43 AM   #7
newtobuntu
LQ Newbie
 
Registered: Dec 2010
Distribution: OSX, ubuntu10.10
Posts: 6

Original Poster
Rep: Reputation: 0
haha makes sense and i just had one of those moments feeling dumb cause i knew ports but not the whole :80 thing in the web browser and all that
thanks for the explanation and im gettin a few podcasts and things too, again this is a learning process for me and a huge learning curve. i think that this will be a large part of my itgs higherlevel assesment.

ok soo any advice on the most user friendly software? again i can handle a command line pretty well
apache2 does not have too much of a detailed tutorials page but havent done too much digging around on the rest of the web

im assuming that each of my 2 ports would lead me to a separate directory in my filesystem?
also now that i understand the one ip two ports which server software would allow me to configure these with the least amount of hassle?

quote:"assume-an ass between you and me" by an old friend of mine

thanks again for your continuing help and support
 
Old 12-07-2010, 04:22 AM   #8
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
soo any advice on the most user friendly software? again i can handle a command line pretty well
Above all else, this would be my primary piece of advice: If you are going to run a server, you have a responsibility to learn to secure it properly as your actions will impact other systems beyond your own.

I would also recommend that you install your applications from your distribution packages rather than trying to build them all yourself from source. This will save you a lot of trouble trying to configure them. Apache is pretty easy and there are only a few configuration files that need to be modified for a basic installation.

FTP tends to be insecure, at least in its default state, largely because authentication information is transmitted in plain text. Be careful with it and make sure that you don't set your FTP directories to be unduly permissive just to make something work (it has happened). Consider using vsftp, which is a better choice.

Ultimately, I imagine that you will want to have SSH capability to access your system remotely. When you do go this route, I would strongly encourage you to use key based (password-less) authentication. Similarly if you install any applications like PhpMyAdmin, either make them accessible by localhost only or put them on a secure web page. If you put them on localhost, you can still ssh in (or make an ssh proxy) and then access them.

A lot of people seem to like webmin, which will provide a web based GUI for many of your server tasks. You might want to investigate that, however, I am of the opinion that learning the command line will be far more rewarding and beneficial in the long run.

Of course, if you run into any problems or have any questions and can't find a solution with Google, you can always post it here. Often times looking at the logs will provide necessary information to solve the problem and putting the error message into google can be enlightening.
 
Old 12-07-2010, 09:13 AM   #9
morfanaion
LQ Newbie
 
Registered: Dec 2010
Distribution: OpenSUSE 10.3
Posts: 7

Rep: Reputation: 0
In response to your question about leading to different directories on your system:

In the httpd.conf file for apache you will have to declare DocumentRoot, which is typically something like /srv/ht-docs/something. That directory will be the root for you website and the location for your index.php or whatever it is you want to put there. Note, there are a number of places where you need to place that directory.

FTP however does not require something like a document root. I would advise disabling anonymous user login and only allow users to login that are known to your Linux system. vsftpd will, if set up to allow users to log in, use your Linux users and, when they log in, lead them to their respective home directories. You can define a webadmin user that will go to the directory of your website to upload the files for you website by setting the home folder of that user to the DocumentRoot that you define in apache.
 
  


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
Ftp(through web site access to ftp server) kelper Linux - Software 4 07-03-2015 05:14 PM
iptables rules for web server email server,ftp and ssh,please help lightwing Linux - Networking 1 03-25-2009 08:58 PM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 04:20 AM
LXer: Backup MySQL databases, web server files to a FTP server automatically LXer Syndicated Linux News 0 08-11-2006 09:54 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:34 AM.

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