Results 1 to 10 of 10
  1. #1

    Command line help

    Is there a tutorial on how to open your httpd.conf file from the command line. I can log into my server as root, but from there I'm lost as to what to do next and what commands to enter.

    Thanks, John

  2. #2
    Join Date
    Mar 2005
    First thing you need to do, is find out where httpd.conf is located.

    You might need to perform an update on the locate database first, so log in as root and type the following:


    After that is complete type:

    locate httpd.conf

    It should show you the location.

    Next type cd locationtohtppd.confhere (where that is the location it is located at.)

    Once you are in the proper directory (probably /usr/local/apache/conf/) you can do a ls to make sure httpd.conf is located there.

    Now type:

    pico httpd.conf

    You can edit at will.

    Caution, I would make a backup before making any changes by hand.

    You can do this by typing in the directory where httpd.conf is located:

    cp httpd.conf httpd.conf.old

  3. #3
    Thank you very much. I was able to find the httpd.conf file and make a back up, but when I put in pico httpd.conf it said "-bash: pico: command not found" What do I do now. Also can you please show me what command to use to upload and download files from the command line.

    Thanks, John

  4. #4
    Join Date
    Mar 2005
    If it is not disabled, you download files to the server with the wget command.

    It appears pico is not installed in your VPS, you may be stuck with vi which is harder to use.

    Check out the following URL on some simple guidelines in using VI

  5. #5
    Join Date
    Mar 2005
    If you are confident enough, and you have a backup of your VPS, you may want to try to install the pine package, which includes pico.

    Maybe even your provider will install it, if you are not comfortable with it.

  6. #6
    Is there a way to download the file to my desktop computer so I could edit it with notepad.

    Thanks, John

  7. #7
    Join Date
    Mar 2005
    What I would do is copy the conf file temporarily to a public downloadable area on the server (I say temporary because you do not want to keep it there).

    Use the cp command again for this.

    Say your home directory for files is in /home

    And your webpage is under the /home directory as user

    You would simply do this from the directory httpd.conf is located in:

    cp httpd.conf /home/user/www

    Or something similar

    Now with your browser or with a FTP tool, download it to your desktop.

    When you are finsihed with it, upload it again to the user directory and then cp it back to the correct location.

    You may be able to use wput as well, it is the opposite of wget pretty much.

  8. #8
    I was able to do as your last post and FTP it to my desktop and edit in notepad then FTP it back. I used the locate function to find a directory on one of my websites to copy the httpd.conf to.

    Thanks again, John

  9. #9
    Join Date
    Mar 2005
    Not a problem, good luck.

  10. #10
    Join Date
    Sep 2003
    United Kingdom
    Pico does not exist as such it is just as such it is just a symlink to nano. If pico doesn’t work try “nano httpd.conf”

    That will work on any Linux distro.

    | BlueWave Communications Ltd - The Island's Communications Provider
    | URL: AS: 201898
    | Jersey | Guernsey | Isle of Man

Posting Permissions

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