Find the answer to your Linux question:
Results 1 to 5 of 5
Hello again, It seems Debian installed my Apache server just nicely from the boot along with the system. How do I edit the " /var/www " folder though ? Sure ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    14

    How do you edit " /var/www " folder for a Server ?

    Hello again,
    It seems Debian installed my Apache server just nicely from the boot along with the system.

    How do I edit the " /var/www " folder though ?

    Sure i could use " su - " to get in as root from the terminal, guide all the way to that folder and using tons of unknown commands for me actually do something, but is this all really necessary ?

    In case It is necessary(very sad...) what commands do i use to open any configuration file like "httpd.conf" because when i use " nano httpd.conf " it opens as a blank file with that name.

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,939
    when i use " nano httpd.conf " it opens as a blank file with that name.
    That would be because you are either not in the directory where httpd.conf is or you don't have permission to modify the file. The httpd.conf file is probably in the /etc directory, at least on my systems. Check the permissions on whichever file you want to modify. The /var directory is most likely owned by root and www by apache so your user needs to be in the apache group with write permission if you want to create or write files there.

    It would be helpful if you indicated which distribution of Linux you are using.

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Posts
    14
    Quote Originally Posted by yancek View Post
    That would be because you are either not in the directory where httpd.conf is or you don't have permission to modify the file. The httpd.conf file is probably in the /etc directory, at least on my systems. Check the permissions on whichever file you want to modify. The /var directory is most likely owned by root and www by apache so your user needs to be in the apache group with write permission if you want to create or write files there.

    It would be helpful if you indicated which distribution of Linux you are using.
    Oh, I am using Debian 6.0.0 .

  4. #4
    Just Joined!
    Join Date
    Feb 2011
    Posts
    14
    Anyone ? ...

  5. #5
    Just Joined!
    Join Date
    May 2006
    Posts
    73
    do a search for httpd.conf you may have several of them.
    How-To: Find files on your computer with find | Debian/Ubuntu Tips & Tricks

    You will definitely not have write access and may well not have read access to that file. So place sudo in front of nano in the command.

    sudo nano /etc/http/httpd.conf
    for example assuming that's the location of the httpd.conf file on your system and that's the specific one that is actually being used.

Posting Permissions

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