Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    May 2007


    Thanx. Now, I need some help here, because I don't know how to conclude that there are apache processes running here nor how to kill them. Thanx!

    With Server Name: linvun
    and no Available Adresses
    I get this:

    [root@Linvun ~]# cd /
    [root@Linvun /]# ps aux | grep httpd
    root 3500 0.0 2.0 24112 10480 ? Ss 00:08 0:00 /usr/sbin/httpd
    apache 3502 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3503 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3504 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3505 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3506 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3507 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3508 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    apache 3509 0.0 1.1 24244 6056 ? S 00:08 0:00 /usr/sbin/httpd
    root 3545 0.0 0.1 3876 676 pts/0 R+ 00:11 0:00 grep httpd
    [root@Linvun /]#
    [root@Linvun /]#
    [root@Linvun /]#
    [root@Linvun /]#

    With Server Name: linvun
    Available Addresses: All available addresses on port 80
    I get this:

    [root@Linvun ~]# ps aux | grep httpd
    root 4029 0.0 0.1 3876 680 pts/1 R+ 00:32 0:00 grep httpd
    [root@Linvun ~]#

  2. #12
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    #killall -9 httpd

    that should kill every httpd process.

    then do the #ps aux|grep httpd
    and make sure there are no running apache process.

    I have had this before (not with apache) where a process was hanging out for a service that wasn't actually running, I think I upgraded a package wrong. Anyway, the running (rogue) process is probably whats keeping you from starting apache back up

    report back.

  3. #13
    Just Joined!
    Join Date
    May 2007
    This is the situation now.

    Server Name: linvun
    All available addresses on port 80

    [root@linvun /]#killall -9 httpd
    httpd: no process killed
    [root@linvun /]# ps aux | grep httpd
    root 7356 0.0 0.1 3876 680 ptx/0 R+ 01:23 0:00 grep httpd
    [root@linvun /]#

    Which system file contains the Server Name? And how do I set the correct Server Name?

    I'm asking this because changing the Server Name field from blank to something triggered the error.

    I remember that, when I started up httpd the first time after freshly, i.e. completely, reinstalling Fedora, I got a message in Terminal saying that no server had been named so automatically was used. That's what the message said, and consequently httpd started up. Virtual hosts worked alright then, but it's strange that the Server Name field should be left blank.

  4. $spacer_open
  5. #14
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    even with the error you mentioned, do the virtual hosts all work now?

    usually you put
    ServerName FQDNofYOURserver

    or the ip address, which won't work for you.

  6. #15
    Just Joined!
    Join Date
    May 2007

    Server Name

    I solved the problem by - again - reinstalling FC6. This did not prove easy, because after the whole installation process X-server failed to start. Only after I removed Linux partitions using gparted, was I able to reinstall Fedora (it's not the first time this X-server error occurred after completing the installation process).

    During installation I set up the Network Configuration manually because I want a static IP address for later router configuration. I was asked to give a computer Hostname, which I did: linvun.comp.

    After installation, I see the hostname back in Terminal, i.e. [root@linvun ~]#

    When inspecting the System => Administration => Server Settings the HTTP screen showed an empty field for Server Name.

    Virtual hosts is working now. Last time, when I decided not to leave the Server Name field empty and put the hostname there, I apparently messed something up because as a result virtual hosts stopped working. When I tried to make the Server Name field blank again and wanted to save the empty field, I got a message saying the field cannot be left blank.

    Maybe THIS has something to do with it, but if so, I wouldn't know how to go about this.

    QUESTION: why is the Server Name field blank and what are we supposed to do with that option anyway if it only leads to messing things up? Where can I find instructions?

  7. #16
    Just Joined!
    Join Date
    May 2007

    Totally unreliable

    On the next morning the line:

    All available addresses on port 80

    had spontaneously disappeared from the window
    System => Administration => Server Settings => HTTP Server Configuration

    I added that line and clicked the Save button, anticipating what would happen:

    the line Server Name could not be left blank. So I tried some server names (Server, linvun.comp, linvun) but alas... virtual host refused to work again.

    I'm abandoning Fedora know. Maybe SuSE does it better.

    I am also disappointed about the help I received from the Linux community. Having said that: jledhead, thanx for your support!

  8. #17
    Just Joined!
    Join Date
    May 2007

    1-0 for SuSe

    Got rid of Fedora Core 6, installed OpenSuSe.

    Good news: virtual hosts are working wonderfully!

  9. #18
    Just Joined!
    Join Date
    May 2007

    steps to set up virtual hosts in fedora core 6 (fc6)

    Got back to Fedora from SuSE. At last figured out a way to setup virtual hosts myself. I decided to post my solution here just in case it might suite somebody else. I had searched on the web for hours, even days, and didn't come across anything that worked for me. The following setup did work, however.

    My OS: Fedora Core 6.
    IP-adress: dynamic
    DNS-service: DynDNS
    DNS-update client: ddclient
    URLs (e.g.):
    Website directories (you can do it differently to your own taste):

    Step 1
    Use or create the above mentioned directories.

    Step 2
    Put index.html files in each of the directories. Give them different titles, messages and background colors to your own taste.

    Step 3
    Open: System => Administration => Server Settings => HTTP
    Put any Server Name in the top field, e.g.: hiphip
    You may ignore the Webmaster email address field
    Make sure the Available Addresses field remains blank
    Click on the tab: Virtual Hosts
    Click Edit to modify the Default virtual host
    Type any Virtual Host Name, e.g.: Default, or: GeorgeBush
    Type the Document Root Directory, in my case: /var/www/html
    You may ignore the Webmaster email address field
    Make active: All requests on port
    Type this port number: 80
    Click OK (2 x) and Save the settings when asked

    Step 4
    Open as root in an editor like Gedit:
    Computer => Filesystem => etc => httpd => conf => httpd.conf
    Go down to the bottom and find the line:
    # NameVirtualHost *:80
    Uncomment the line, to make it look like:
    NameVirtualHost *:80
    Below the other lines, add the following lines, putting your own data there:

    <VirtualHost *:80>
    DocumentRoot /var/www/vhosts/test1
    </VirtualHost *:80>

    <VirtualHost *:80>
    DocumentRoot /var/www/vhosts/test2
    </VirtualHost *:80>

    <VirtualHost *:80>
    DocumentRoot /var/www/vhosts/test3
    </VirtualHost *:80>

    Step 5
    Restart the httpd server in Terminal as root by typing:
    /etc/init.d/httpd restart

    Now your virtual hosts should be working, provided that port 80 is open in your Firewall (and router, if you've got one), and provided that your (dynamic) IP address can be reached by the outside world.

    This is how it works for me. If anyone knows a different approach that works too, maybe you could post it here to share it with the rest of us.

    My next project: setting up an FTP server with vsftpd or pure-ftpd. Help from the community with a setup instruction like the one I've put here will be appreciated.

  10. #19
    Just Joined!
    Join Date
    May 2007

    vsftpd is working now too!

    Thanx to a lot of folks on the internet I have managed to set up virtual users. Those virtual users may approach 'their own website' on my server by ftp. The ftp client I used is vsftp. The following scheme works for Fedora Core 6. Basically, it should also work for other Linux distro's such as SuSE, possibly with some modifications.

    Keep in mind that in order to use ftp, port 21 must be open in your Firewall and router. If you have SELinux enabled, you must modify SELinux (System => Administration => Security Level) to allow ftp.

    I use vsftpd as a standalone server, without inet and the like.

    From now on, I assume that you operate as root. I modify files using Gedit, not vi.

    Before you start, keep in mind that virtual users are in fact guest users. A guest user may only get access if there is a real user who 'invites' the guest. This means you need to create a real user for ftp purposes. That's what we'll do later on.

    Step 1 - PACKAGES

    Required packages:
    pam (installed by default)
    db (my version of Fedora has db4 installed by default)
    compat-db (provides db42_load; this might not be required for SuSE)

    Check which db is installed
    TERMINAL: rpm -qa | grep -i db
    If the list that appears does not contain a database, i.e. db, db3 or db4, you've got to install it.
    TERMINAL: yum install db4
    (SuSE probably has db installed as default)

    Install compat-db (might not be necessary for SuSE)
    TERMINAL: yum install compat-db

    Check if you've got vsftpd
    TERMINAL: rpm -q vsftpd
    If the message says vsftpd is not installed, then
    TERMINAL: yum install vsftpd

    Step 2 - CONFIGURE PAM

    TERMINAL: locate
    You'll probably get: /lib/security/
    If necessary, adjust the location in the file you're going to edit now

    Edit the following file in Gedit or vi:
    This is what it should look like:

    session optional force revoke
    auth required /lib/security/ db=/etc/vsftpd/vsftpd_users
    account required /lib/security/ db=/etc/vsftpd/vsftpd_users
    #auth required item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
    #auth required
    #auth include system-auth
    #account include system-auth
    #session include system-auth
    #session required

    You only need the first three lines to work. Any other lines need to be commented out (#) because they might just bar your beloved virtual users.


    You need a user that may invite guest users. Let's call him: inviter. In fact, inviter is not going to do anything, but he's got to exist.
    TERMINAL: adduser -d /home/inviter inviter

    You have now created:
    user: inviter
    group: inviter
    home directory: home/inviter

    The home directory of user inviter is /home/inviter. Since we want /var/www/vhosts (or whatever you chose) to be the home directory, we change it now
    TERMINAL: usermod -d /var/www/vhosts inviter


    Edit /etc/vsftpd/vsftpd.conf in Gedit or vi.

    Leaving out the commented lines (#), this is what the file should look like (you may set anonymous_enable to YES if that's what you want):


    # Virtual users will be logged into /var/www/vhosts/[username]/ (or whatever path you chose earlier, in which case you must change the path of local_root below)
    # Umask applied for virtual users and anon
    # Allows uploading by virtual users
    # Allows creation of directories by virtual users
    # Allows deletion of files and directories by virtual users

    Now, check if vsftpd is running
    TERMINAL: /etc/init.d/vsftpd status

    If vsftpd is not running, start it up
    TERMINAL: /etc/init.d/vsftpd start

    If vsftpd is running, restart it
    TERMINAL: /etc/init.d/vsftpd restart

    You must always restart vsftpd in order for changes in the vsftpd.conf file to take effect.


    You can only make a database file indirectly. Therefore, first create a text file in directory /etc/vsftpd and give it any name. The name could be: vsftpd_users.txt. The file is going to contain your guest users aka virtual users and their passwords. Always write them on alternate lines, i.e., user1 on line 1, the password for user1 on line 2, user2 on line 3, the password for user2 on line 4 et cetera. Let's create three users (if you want a fourth one, you may add Ringo):


    You should keep the vsftpd_users.txt file for two reasons: (1) to always know what names and passwords are in the database, and (2) to load the data of this file into the database.

    If the directory /etc/vsftpd/ already contains the file vsftpd_users.db remove it first
    TERMINAL: rm /etc/vsftpd/vsftpd_users.db

    Now we recreate it and feed it with the users inside our text file
    db42_load -T -t hash -f /etc/vsftpd/vsftpd_users.txt /etc/vsftpd/vsftpd_users.db
    (SuSE-users should probably use db_load instead of db42_load)

    Now we set the correct permissions:
    TERMINAL: chmod 600 /etc/vsftpd/vsftpd_users.db /etc/vsftpd/vsftpd_users.txt


    In directory /var/www/vhosts (or whatever you made up yourself) create the directories john, paul and george. Put something inside them, so you recognize them when you're going to check them out later.

    Permissions: since virtual users are treated like anonymous guests you will have to write-enable their directories and content for 'others' in order to allow those users to upload and modify their files.
    cd /var/www/vhosts
    chmod 777 john paul george

    Your virtual hosts should now be working.

    Sometimes the database gets quirky and ftp does too. Simply delete vsftpd_users.db and upload vsftpd_users.txt again (see Step 5)

    Don't forget to open port 21 of your Firewall and router. And make sure SELinux allows ftp connections.

    Should you encounter any problems, make sure to check /var/log/secure first.

  11. #20
    Just Joined!
    Join Date
    May 2007

    vsftp and virtual users

    See the steps in the previous entry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts