My Notepad

  • My Linux Notes
  • My Grid Notes
  • To do List
  • Saturday, January 14, 2006

     
    Apache on Linux

    The default web pages for apache on fedora core 4 is /var/www/html, and only root have the
    write access to this directory.
    It's annoying to switching between normal user and root again and again during web development,
    if you want to edit files directlty in /var/www/html.
    At beginning, I tried to created a symbolic link in /var/www/html, linking to my home directy /home/synew/www by using,
    #ln -s /home/synew/www /var/www/html/synew
    Although you can get the link file working well under bash, but it was not working when I tried to
    access the webpage I put in /home/synew/www/test.html, for example.
    (When you type "http://localhost/synew/test.html" in the browser, it says" having no permission" to access)

    So I changed to modify the access attribute of /var/www/html, what I did was,
    1, #chgrp apache /var/www/html
    2,#chmod -R g+w /var/www/html
    3,make the normal user account in group "apache"

    Finally, I created a link file in my home directly linking to the webpage directory.
    >ln -s /var/www/html ~/www

    Comments: Post a Comment



    << Home

    Archives

    December 2005   January 2006   February 2006   April 2006   May 2006   June 2006   July 2006   November 2006   February 2007   May 2007   June 2007   November 2007   February 2008   March 2008   April 2008   August 2008   December 2008   March 2009   April 2009   May 2009   June 2009   October 2009   November 2009   December 2009   May 2013  

    This page is powered by Blogger. Isn't yours?