hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : Command line help
Reply

Forum Jump

Command line help

Reply Post New Thread In VPS Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Newbie
 
Join Date: Apr 2005
Posts: 9

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



Sponsored Links
  #2  
Old
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

  #3  
Old
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

Sponsored Links
  #4  
Old
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

  #5  
Old
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.

  #6  
Old
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

  #7  
Old
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.

  #8  
Old
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

  #9  
Old
Junior Guru Wannabe
 
Join Date: Mar 2005
Posts: 88
Not a problem, good luck.

  #10  
Old
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

__________________
| BlueWave Communications Ltd - The Island's Communications Provider
| URL: http://www.bwc.im/ AS: 201898
| Jersey | Guernsey | Isle of Man

Reply

Related posts from TheWhir.com
Title Type Date Posted
Supreme Court Ruling Opposes Aereo's Streaming Service, But Leaves Many Issues Around Cloud Services Unsettled Web Hosting News 2014-06-26 18:11:36
Web Host BurstNET to Shut Down Customer Services by July 25 Web Hosting News 2014-06-24 18:21:24
Cloud Host DigitalOcean Supports Public IPv6 Addresses in New Singapore Region Web Hosting News 2014-06-17 18:08:11
OnApp Opens Public Cloud Compute Marketplace for Service Providers Web Hosting News 2014-06-17 10:08:31
Linode Releases CLI Tool for Cloud Platform Web Hosting News 2014-01-29 17:15:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?