
04-07-2005, 08:38 AM
|
|
Newbie
|
|
Join Date: Apr 2005
Posts: 9
|
|
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
|

04-07-2005, 08:43 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2005
Posts: 88
|
|
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:
updatedb
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
|

04-07-2005, 09:14 AM
|
|
Newbie
|
|
Join Date: Apr 2005
Posts: 9
|
|
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
|

04-07-2005, 09:17 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2005
Posts: 88
|
|
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
http://www.ms.washington.edu/help/editors/vi.html
|

04-07-2005, 09:18 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2005
Posts: 88
|
|
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.
http://www.washington.edu/pine/getpine/linux.html
Maybe even your provider will install it, if you are not comfortable with it.
|

04-07-2005, 09:42 AM
|
|
Newbie
|
|
Join Date: Apr 2005
Posts: 9
|
|
Is there a way to download the file to my desktop computer so I could edit it with notepad.
Thanks, John
|

04-07-2005, 09:51 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2005
Posts: 88
|
|
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.
|

04-07-2005, 11:23 AM
|
|
Newbie
|
|
Join Date: Apr 2005
Posts: 9
|
|
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
|

04-07-2005, 11:41 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2005
Posts: 88
|
|
Not a problem, good luck.
|

04-08-2005, 07:03 AM
|
|
Junior Guru
|
|
Join Date: Sep 2003
Location: United Kingdom
Posts: 245
|
|
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.
Stuart
__________________
█ The Island's Communications Provider | Jersey | Guernsey | Isle of Man URL: http://www.bwc.im/
█ Online Gaming Friendly - 100% Uptime Dedicated Servers and Colocation
█ IP/MPLS L2/L3 Connectivity Between London, Leeds, Manchester and our Island networks.
█ Wholey owned fibre network in the Isle of Man
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|