LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Web Server Configurations? (https://www.linuxquestions.org/questions/linux-newbie-8/web-server-configurations-37585/)

DevlshOne 12-07-2002 12:47 PM

Web Server Configurations?
 
First, thanks for even thinking to setup a site like this - there are many of us out there who have limited exposure to Linux simply because of the Microsoft dynasty over the past 20 years.

I thought I was relatively intelligent until I decided to try and get my SuSE 8.1 webserver going. I have all the necessary modules installed - Apache, MySQL, PHP and VSFTP. I have a root and user account created and I can ping the box from other machines on my LAN.

Let me interject that I do have a working "development only" apache webserver running on a Windows box on this same LAN - so I am quite familiar with the httpd setup.

However, I do not seem to be able to get the ftp to work. I want to connect to the new box via ftp (using FXP, if possible) and duplicate my current www subdirs on the new serverbox. My FTP client says that the connection is denied. Can anyone point me to a sample vsftp.conf file that might help me get this configured?

Any other help you can supply would be GREAT!

bulliver 12-07-2002 02:08 PM

May be dumb, but do you have your ftp port blocked by a firewall? I'm thinking this because of your "access denied" error message.

DevlshOne 12-07-2002 02:56 PM

Only if SuSE loads a firewall on the box by default. I would hope that if you select all the "Server" packages, the firewall would be configured to allow ports 21 and 80 to be accessed.

Then again - I don't really know what the Linux firewall is - so I am not sure what to look for on that box.

bulliver 12-07-2002 04:45 PM

Hmm, not neccesarily. I'm not sure about SuSe but it should have a gui for configuring your firewall. Pretty much every Linux distro sets up a firewall. look for something along the lines of "security" or "firewall manager" and see if the ports allow access. doesn't yast handle all those sorts of admin things in SuSe?

Choosing server installation simply selects default packages to be installed. The firewall is a seperate issue. Was there not a screen to customize it during installation?

Sorry I can't help more but I don't use SuSe...

DevlshOne 12-07-2002 05:31 PM

Ok.. I found the Firewall Settings under Security through the YaST2 control panel and disabled the firewall. I also found the inetd setup screen that turns services on and off - but there are 3 different ftp services - GEESH! After telling it to activate the vsFTP service and restarting the inetd services I still get the same error message.

bulliver 12-07-2002 05:42 PM

Ok, I think I found your problem, you must add who you want to access in /etc/hosts.allow ie:

To allow access from localhost:
vsftpd: 127.0.0.1

To allow access from everybody on the 192.168.1.0/24 subnet:
vsftpd: 192.168.1.

To allow access from two specific addresses:
vsftpd: 192.168.1.100 192.168.5.53

To allow access to everybody:
vsftpd: ALL

These settings will be overided by settings in:
vsftpd.ftpusers and vsftpd.user_list

I was checking the settings in my vsftpd.conf and they seem quite permissive, so maybe if this still doesn't work I will post it for you.

Hope this finally solves your problem.

btw: If your box is connected to the internet, do not disable the firewall (cracker city!), you should be able to allow access to specific ports. Only allow access to those ports that you need to. If your box is simply a testing station and not conected to the internet then you can ignore this.

DevlshOne 12-07-2002 07:01 PM

Almost there!!

Here's my vsftpd.conf:
Code:

anonymous_enable=NO
local_enable=YES
userlist_deny=NO
userlist_enable=YES
chroot_local_user=YES
write_enable=YES

And I have a vsftpd.user_list with a single line entered with my username. Now I can get past the firewall but get a 530 Permission Denied. If vsftpd.user_list overrides vsftpd.conf, then this config should work.

Any ideas?

bulliver 12-07-2002 08:50 PM

Well, I'm stumped. Double check the permissions of the directory you are ftp'ing into (should be user's home directory if chroot_local_user=YES) and make sure that you can read and write.

On last idea: change chroot_local_user to "NO" and create a file (if it doesn't already exist) called /etc/vsftpd.chroot_list with only your username in it. This file explicitly lists users to chroot if chroot_local_user is set to "NO".

You are restarting the ftp daemon after changing the settings, right?

Other than that I am chock out of ideas.

DevlshOne 12-08-2002 12:41 PM

SUCCESS!! Did some playing around in hosts.allow, adding the line vsftpd : ALL : ALLOW and everything started working just fine. Now I have to figure out how to EITHER get it to go straight into the /srv/www/htdocs dir rather than the /usr/~username/public_html dir OR to tell Apache that their will be dirs under the usernames that need to be published.

Thanks for all of your help - I would still be scratching my head if it wasn't for you!

bulliver 12-08-2002 02:45 PM

Glad to hear you got it working. If you want apache to serve the user dir, look for this section in httpd.conf and edit it for your settings:

Code:

# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
  #  UserDir "disable"

    #
# To enable requests to /~user/ to serve the user's public_html
# directory, use this directive instead of "UserDir disable":
#
UserDir public_html

</IfModule>

Can't you just use your FTP client to navigate to the /srv/www/htdocs directory, then upload your files? I assume that's where you really want to put them.

You can also add an alias to httpd.conf that points a directory anywhere on your system.

DevlshOne 12-08-2002 02:58 PM

Since I will be the only one admin'ing this machine, I suppose the best way to do this is to make it so that I am able to navigate to the /srv/www/htdocs dir. I'm not familiar enough with Linux user groups and permissions to make sure that I have access to everything I need without being logged in as root or giving myself COMPLETE root access.

Can you recommend any good Linux books?

bulliver 12-08-2002 03:51 PM

I have Running Linux, by Matt Welsh et al. I think it's a great book and is pretty much how I tought myself Linux, so I would recommend it, plus it is O'Reilly so you know it's good quality. I have the 3rd edition which is a little out of date now, but they are set to release the 4th edition anyday (if they haven't already). You may also be interested in "Apache: The definitive guide" which is the defacto apache administrator's guide. Pretty much any book by O'Reilly with the subject you want to learn about in the title is a good bet. (no, I don't work for them!!!)

DevlshOne 12-15-2002 12:01 PM

Thanks!

Borrowed Linux for Dummies from a friend - not quite what I was looking for. I used UNIX/VAX terminals in college to do all my PASCAL and C programming but that has been quite a while. :)

I do have another question -

When SSH'd into my Linux box, is there a way to use XWindows? Or is there a "Termnal Services" or "PC Anywhere" type software for Linux boxes? I wuold like to be able to use GUI text editors while shell'd over but only VI and VIM seem to work.

Thanks again.

bulliver 12-15-2002 03:18 PM

I think this is what you're looking for :

http://www.uk.research.att.com/vnc/


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