Edit HTTPD.CONF

Sigma721

Well-Known Member
Joined
Sep 14, 2011
Messages
122
Reaction score
0
Hi everyone

I have close to no Linux experience, but neet to change the httpd.conf file under etc/http/cfig/.
I have tried logging in terminal using su and then trying "gedit etc/http/cfig/httpd.conf". Doing this I get an "EggSMClient-WARNING ** : Failed to connect to the session manager
GConf Error."

Does anyone know how to get around this?
 
Which distribution are you using?

I'm guessing running gedit as root can't communicate with the desktop (the session manager) which is running as you.

Try running 'sudo gedit etc/http/cfig/httpd.conf' without running 'su'.
Failing that, try running a text based editor 'nano gedit etc/http/cfig/httpd.conf' after running 'su'.
 
Before you run gedit, run "export DISPLAY=:0"
 
Just use nano. it's a lot simpler than vim and won't torture you.

Either:

Code:
sudo nano /etc/httpd/conf/httpd.conf

or

Code:
su
nano /etc/httpd/conf/httpd.conf

Path is obviously dependant on where apache is installed to.
 
Just use nano. it's a lot simpler than vim and won't torture you.

Either:

Code:
sudo nano /etc/httpd/conf/httpd.conf

or

Code:
su
nano /etc/httpd/conf/httpd.conf

Path is obviously dependant on where apache is installed to.

I think the question we must ask why use apache when nginx is ooooh so much better and then you can configure nginx with ngx_pagespeed mmm moist.
 
I think the question we must ask why use apache when nginx is ooooh so much better and then you can configure nginx with ngx_pagespeed mmm moist.

Depends if you serving dynamic or static content.
Nginx is faster for static content, but is much the same as apache on dynamic php content (version 2.2 atleast) Unless you are serving 500+ concurrent connections, which 90% of sites don't do.

Apache 2.4 however seems faster than nginx on both static and dynamic content.
 
Last edited:
Depends if you serving dynamic or static content.
Nginx is faster for static content, but is much the same as apache on dynamic php content (version 2.2 atleast) Unless you are serving 500+ concurrent connections, which 90% of sites don't do.

Apache 2.4 however seems faster than nginx on both static and dynamic content.


True thats why you have multiple servers configured serving different content.
 
Thanks so much, but when I try this I get a bash error.
Then I read up a bit and found out that I do not have Nano installed on Centos, now when I try install it I get an error saying that it cannot connect to the server to download the install files, when I try edit the yum repo file I cannot cause I cant edit any read-only files without Nano it seems! I am kinda lost, any suggestions?

Just use nano. it's a lot simpler than vim and won't torture you.

Either:

Code:
sudo nano /etc/httpd/conf/httpd.conf

or

Code:
su
nano /etc/httpd/conf/httpd.conf

Path is obviously dependant on where apache is installed to.
 
What version of centos?
You can download the rpm from the nano website : http://www.nano-editor.org/download.php
Or http://pkgs.org/download/nano

Or you can use vi still if you want to get a headache.

Tip if you a newbie : One of the first things I used to do after installing a distro was to install webmin. It made a lot of my admin tasks easier cause of the web interface, and saved me a lot of time. Make sure you secure it properly though, and note what it does and doesnt do well. http://www.webmin.com/rpm.html

A lot of the old hands will see this tool as blasphemous, but It will save you a lot of trouble, and I had a family to go to, so now could leave some of the simple tasks to my minions
 
Last edited:
What version of centos?
You can download the rpm from the nano website : http://www.nano-editor.org/download.php
Or http://pkgs.org/download/nano

Or you can use vi still if you want to get a headache.

Tip if you a newbie : One of the first things I used to do after installing a distro was to install webmin. It made a lot of my admin tasks easier cause of the web interface, and saved me a lot of time. Make sure you secure it properly though, and note what it does and doesnt do well. http://www.webmin.com/rpm.html

A lot of the old hands will see this tool as blasphemous, but It will save you a lot of trouble, and I had a family to go to, so now could leave some of the simple tasks to my minions

He cannot use VI and you are giving him a page to rpms? But yeah the default is /etc/httpd/conf/httpd.conf
 
What change do you need to make?
Is it one line, or more?
 
He cannot use VI and you are giving him a page to rpms? But yeah the default is /etc/httpd/conf/httpd.conf

He I trying to use yum, and he needs a text editor he can use
The webmin page has simple instructions to install. And no, vi is not the easiest program to use for a newbie, far harder than a few lines typed in at the command prompt
 
Thanks so much everyone!

I have managed to change the default page that loads when my servers address is called up.

Appreciate all the help!
 
Top
Sign up to the MyBroadband newsletter
X