1

So I am setting up a localhost for web development on my Fedora 20 desktop. I have installed httpd and so forth...

The issue I have is adding my user to the /var/www and to /var/www/html. I looked into /etc/group and did not see a www-data group nor a http group, but I did see an apache group.

But when I ls -alF /var:

    drwxr-xr-x.  4 root root 4096 Mar  3 09:46 www/

And /var/www:

    drwxr-xr-x.  2 root root 4096 Oct 14 21:17 html/

So they are owned by the root group. How would you recommend setting up these folders so that my user has access to these folders for web development?

Daniel Toebe
  • 133
  • 2
  • 5

1 Answers1

2

In Fedora, /var/www is used for the default web site, which shows the test page when someone hits your web site with its direct IP address or a hostname for which no virtual host is configured. Since this directory is managed by the packaging system, it's best practice to place your own web sites in directories under /srv/www (which you should create) and set their ownership and permissions to whatever is appropriate for your particular scenario.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940