Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    3

    Default How Can I Modify The "Httpd.conf"?

    I have bought the whm, but now, I want to modify "httpd.conf" add application/http .html
    but when I login with ssh, the file httpd.conf can't be modified, it says permition defined

    Can you help me ,tell me how can i change the httpd.conf , and can i use cpanel to change it ,and how to do?

    thank you!

  2. #2
    Member markfrompf's Avatar
    Join Date
    Mar 2006
    Location
    Los Angeles, CA
    Posts
    179

    Default

    You should be able to mod the file in SSH. Make sure you're logging in as "root."

    If you are logged in as "root" and are still having problems, there is a serious issue.

    If you don't have root access, make sure you have full ssh access with no restrictions.

    You should be able to use pico and edit it.
    -----------------------------------------------------------
    | Mark A. Mutti: PhireFast Website Hosting
    | E: Mark.mutti@phirefast.com - P: (866) 350-4456 Ext. 100
    | 24/7 Support, 15 Minute Average Response Time
    | cPanel, Fantastico, Webmail & More!
    -----------------------------------------------------------

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    3

    Default the problem is also

    I have the root , but the problem is still, how should I do?

    Is ssh's problem?

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    378

    Default

    the httpd.conf might only have the read only read attribute, try running the following command as root to see if it helps:

    chattr -i httpd.conf

    after that edit and save the file
    Tweakservers | Professional Server Setup & Security Hardening
    Authorised SmarterTools Reseller, SSL Certificate & TRUSTe Privacy Policy

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    3

    Default I Have Do That ,But Wrong!

    I Have Do That , But The Wrong Is "chattr: Permission denied while reading flags on httpd.conf
    "

    Why?

  6. #6
    Member Shinichi Kato's Avatar
    Join Date
    Mar 2005
    Location
    Saitama-ken,japan
    Posts
    73

    Wink Uid 0

    Are your "root" UID 0?

    grep root /etc/passwd

    The result

    root:x:0:0:root:/root:/bin/bash
    Service of my company is "free web server" "shared web server" "dedicated web server" in Japan.
    [ADSV.JP]FREE WEB SERVER
    Total Media Studio Help Forum
    TMS at GoogleMap

  7. #7
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    What do you see when you type "whoami"?

    If you are not connected as "root" then that is your problem.

    The fact that you can't edit httpd.conf and you don't have permission
    to use the chattr command on httpd.conf makes me suspect that you
    are not actually logged in as root but rather some other user.

    Now, you said something else that puzzles me ....
    I want to modify "httpd.conf" add application/http .html
    Why in the world would you be trying to add a line that is already in the httpd.conf file?

  8. #8
    k1k
    k1k is offline
    Member
    Join Date
    Mar 2006
    Posts
    27

    Default The htpd.conf

    You should use ssh connection and login as root user to your server. Then you can use any text editor in order to modify your httpd.config file (vi,vim,pico,nano,mcedit...).
    And the chattr command... It will work only if your filesystem is ext3. If you are using reiserfs - then you wont be able to set chattr flags.
    So here is one simple example if you want to be sure that everything is ok with your file permissions.


    cp -ar /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.1
    rm -rf /usr/local/apache/conf/httpd.conf
    cp -ar /usr/local/apache/conf/httpd.conf.1 /usr/local/apache/conf/httpd.conf

    If you have no errors then you will be able to edit your config also ...

Similar Threads & Tags
Similar threads

  1. Replies: 5
    Last Post: 11-09-2009, 06:18 AM
  2. Created User dont show up in "MODIFY AN ACCOUNT" list :(
    By rdpcom in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-27-2008, 06:40 AM
  3. Apache httpd.conf "group #-1"
    By Vizzi in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-29-2007, 07:50 AM
  4. httpd.conf format change with latest "release"?
    By ffeingol in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-12-2007, 11:36 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube