Results 1 to 9 of 9

Thread: gedit httpd.conf in ubuntu

  1. #1
    Join Date
    Jul 2011
    Beans
    67

    gedit httpd.conf in ubuntu

    hi,
    I tried to open httpd.conf using gedit, so I typed the following command
    Code:
    sudo gedit /etc/apache2/httpd.conf
    and I got the following errors before an editor opened up with an empty httpd.conf file.
    this is the error message:
    Code:
    (gedit:15088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.YM5YYV': No such file or directory
    
    (gedit:15088): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
    should i just ignore the error messages? but then why is httpd.conf empty?

  2. #2
    Join Date
    Jul 2011
    Beans
    13
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: gedit httpd.conf in ubuntu

    You can ignore this message, it is harmless. Just trying to store the list of recently opened files files and it fails.

    Alternative is to:

    1) Use gksudo instead of sudo (apt-get install gksu)
    2) Use a command line tool such as vim instead of gedit

  3. #3
    Join Date
    Jul 2011
    Beans
    67

    Re: gedit httpd.conf in ubuntu

    thanks for your response bhinderm,
    I tried gksudo gedit /etc/apache2/httpd.conf

    and it opens up the file without the error messages, but the httpd.conf is still empty? Is it supposed to be empty?
    If not, what should it contain - I can type the contents and see if that works.

  4. #4
    Join Date
    Aug 2006
    Beans
    13,354
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: gedit httpd.conf in ubuntu

    Quote Originally Posted by itba View Post
    thanks for your response bhinderm,
    I tried gksudo gedit /etc/apache2/httpd.conf

    and it opens up the file without the error messages, but the httpd.conf is still empty? Is it supposed to be empty?
    If not, what should it contain - I can type the contents and see if that works.
    If you just want to see the content of a file, there is no need to open it for editing, use gedit, less or cat, for example:

    gedit /etc/apache2/httpd.conf

    less /etc/apache2/httpd.conf

    On the other hand, if you want or need to edit the file, use 'gksudo gedit', but it's also advisable to know what to put there, and if you don't, chances are, you don't need to edit it.

  5. #5
    Join Date
    Jul 2011
    Beans
    13
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: gedit httpd.conf in ubuntu

    They changed the configuration file from httpd.conf to apache2.conf. Try editing /etc/apache2/apache2.conf

    httpd.conf is empty by default now.

  6. #6
    Join Date
    Jul 2011
    Beans
    67

    Re: gedit httpd.conf in ubuntu

    thanks bhinderm that's good to know. I do see contents in the apache2.conf. I am learning how to setup a webserver, so one of the sites had suggested editing the httpd.conf file and I was following instructions. However, it was only basics, and its obviously not updated. If you have any suggestions for a good site for beginners (other than the apache documentation), that'll be helpful

  7. #7
    Join Date
    Jul 2011
    Beans
    13
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: gedit httpd.conf in ubuntu

    No problem!

    Config files keep changing between software revisions and it can be confusing. The apache documentation is the best place to go to for updated information. Other than that Linux home networking might be of use:

    http://www.linuxhomenetworking.com/w...che_Web_Server
    https://help.ubuntu.com/8.04/serverguide/C/httpd.html (outdated)

  8. #8
    Join Date
    May 2006
    Beans
    268

    Re: gedit httpd.conf in ubuntu

    Put your sites in: /etc/apache2/sites-available and run a2ensite after.

  9. #9
    Join Date
    Jul 2011
    Beans
    67

    Re: gedit httpd.conf in ubuntu

    cool,
    thx for the links bhinderm, that's good to know regd. the config files
    and thx for the suggestion linuchsan...

Bookmarks

Posting Permissions

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