Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   Where do you put all your HTML stuff on a home Linux server? (http://www.linux-archive.org/fedora-user/24082-where-do-you-put-all-your-html-stuff-home-linux-server.html)

Chris G 12-28-2007 03:10 PM

Where do you put all your HTML stuff on a home Linux server?
 
I've been changing my mind and messing about with this for years and
*still* haven't really come to a sensible final conclusion. It's not
even that it matters all that much but I wish there was an obvious
answer.


There are two basic alternatives, each with advantages and
disadvantages:-

1 - In your home directory

Permissions are easy to deal with, no need to become root to edit
web pages.

But it means that, if the outside world has access, you have to be
*very* careful with apache set up if you want to be sure only the
right bits are visible to the outside world.

You either have to use ~<user> in the URL or you have to add
symbolic links from apache's DocumentRoot.

If there's more than one user (not in my case) using /home makes more
sense.

Backing up is easy as the HTML gets backed up with your home
directory (though there might be bits in DocumentRoot you want to
back up as well).


2 - In apache's DocumentRoot (/var/www/html in my case)

Messier with permissions if you want to edit HTML without becoming
root all the time. Also not so convenient for editing even with
permissions set up OK as it's not in your home directory.

Easier to make sure that any outside access can only see what you
want to be seen.

Cleaner/easier URLs without the need for symbolic links.

Not really practical for multi-user but this doesn't apply for me.

Need to back up separately from /home (though I suppose you could
make /var/html a link across to the /home partition)


I keep a lot of quite dynamic (i.e. frequently changing) files as
HTML, or at least their content is web browsable, so the above issues
are important for me.

Does anyone have any comments, ideas, solutions?


--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

"Robert P. J. Day" 12-28-2007 03:12 PM

Where do you put all your HTML stuff on a home Linux server?
 
/srv

rday
--
================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Chris G 12-28-2007 04:05 PM

Where do you put all your HTML stuff on a home Linux server?
 
On Fri, Dec 28, 2007 at 11:12:14AM -0500, Robert P. J. Day wrote:
>
> /srv
>
.... and how does that help? It just adds yet *another* possibility!

It makes it easy to keep separate and to back it up I suppose but
doesn't address the ease of editing or permissions issues.

Is it what /srv is intended for? All there is in my /srv is a
bittorrent directory.

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

"Robert P. J. Day" 12-28-2007 04:08 PM

Where do you put all your HTML stuff on a home Linux server?
 
On Fri, 28 Dec 2007, Chris G wrote:

> On Fri, Dec 28, 2007 at 11:12:14AM -0500, Robert P. J. Day wrote:
> >
> > /srv
> >
> .... and how does that help? It just adds yet *another* possibility!
>
> It makes it easy to keep separate and to back it up I suppose but
> doesn't address the ease of editing or permissions issues.
>
> Is it what /srv is intended for?

yup.

http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM

rday
--
================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Neil Cherry 12-28-2007 04:11 PM

Where do you put all your HTML stuff on a home Linux server?
 
Chris G wrote:
I've been changing my mind and messing about with this for years and
*still* haven't really come to a sensible final conclusion. It's not
even that it matters all that much but I wish there was an obvious
answer.



There are two basic alternatives, each with advantages and
disadvantages:-

1 - In your home directory

Permissions are easy to deal with, no need to become root to edit
web pages.

But it means that, if the outside world has access, you have to be
*very* careful with apache set up if you want to be sure only the
right bits are visible to the outside world.

You either have to use ~<user> in the URL or you have to add
symbolic links from apache's DocumentRoot.


I use this method, but to reach my box you have to use an SSH
tunnel so I'm not overly worried about outside access. First
you have to get past the access lists, then login using ssh
then connect to the correct place. I don't permit direct access
to my home network from the outside world.

--
Linux Home Automation Neil Cherry ncherry@linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
Author of: Linux Smart Homes For Dummies

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Chris Snook 12-28-2007 04:16 PM

Where do you put all your HTML stuff on a home Linux server?
 
Chris G wrote:

2 - In apache's DocumentRoot (/var/www/html in my case)

Messier with permissions if you want to edit HTML without becoming
root all the time. Also not so convenient for editing even with
permissions set up OK as it's not in your home directory.


For home use, I find 'chown -R luser:luser /var/www/html' to be a suitable
solution. You can also 'ln -s /var/www/html ~/public_html' and then any scripts
or html editing apps that look in your home directory will be happy, but you
don't need to worry about enabling home directory support in httpd and SELinux.


-- Chris

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Tim 12-28-2007 04:19 PM

Where do you put all your HTML stuff on a home Linux server?
 
On Fri, 2007-12-28 at 16:10 +0000, Chris G wrote:
> 2 - In apache's DocumentRoot (/var/www/html in my case)
>
> Messier with permissions if you want to edit HTML without becoming
> root all the time. Also not so convenient for editing even with
> permissions set up OK as it's not in your home directory.
>
> Easier to make sure that any outside access can only see what you
> want to be seen.
>
> Cleaner/easier URLs without the need for symbolic links.
>
> Not really practical for multi-user but this doesn't apply for me.
>
> Need to back up separately from /home (though I suppose you could
> make /var/html a link across to the /home partition)

I tend to follow this direction: Change the /var/www/html ownership, or
the ownership of a sub-directory (more preferable), to yourself. Put a
symlink from your homespace to that location (this is a shortcut for
your editing purposes, files are web served directly from Apache's usual
location for public files).

It's quite practical for multi-users, if they have their own
sub-directories in /var/www/html. Or you change the group ownership,
and add appropriate users to that web-authoring group.

--
(This computer runs FC7, my others run FC4, FC5 & FC6, in case that's
important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Felix Miata 12-28-2007 04:23 PM

Where do you put all your HTML stuff on a home Linux server?
 
On 2007/12/28 16:10 (GMT) Chris G apparently typed a message found at:
https://www.redhat.com/archives/fedora-list/2007-December/msg03873.html

Apache serves mine from /srv, but, except for images, that's just a copy of
what's in my work directory, which I copy to /srv only after I'm content it's
ready for the world to see. Images I keep in yet another location, with soft
links thereto in the /srv tree. All three locations are on separate
partitions with unique backup strategies.
--
Jesus Christ, the reason for the season.

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://mrmazda.no-ip.com/

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Chris G 12-28-2007 04:36 PM

Where do you put all your HTML stuff on a home Linux server?
 
On Fri, Dec 28, 2007 at 12:08:28PM -0500, Robert P. J. Day wrote:
> On Fri, 28 Dec 2007, Chris G wrote:
>
> > On Fri, Dec 28, 2007 at 11:12:14AM -0500, Robert P. J. Day wrote:
> > >
> > > /srv
> > >
> > .... and how does that help? It just adds yet *another* possibility!
> >
> > It makes it easy to keep separate and to back it up I suppose but
> > doesn't address the ease of editing or permissions issues.
> >
> > Is it what /srv is intended for?
>
> yup.
>
> http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM
>
Yes, I just found my way there too and /srv does seem to be the 'most
correct' place for web pages and other related things. It does seem
that it's far from a well defined standard yet though which would
account for the many different directories used by different
distributions.

Thanks for the pointer.

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Chris G 12-28-2007 04:38 PM

Where do you put all your HTML stuff on a home Linux server?
 
On Fri, Dec 28, 2007 at 12:16:16PM -0500, Chris Snook wrote:
> Chris G wrote:
>> 2 - In apache's DocumentRoot (/var/www/html in my case)
>>
>> Messier with permissions if you want to edit HTML without becoming
>> root all the time. Also not so convenient for editing even with
>> permissions set up OK as it's not in your home directory.
>
> For home use, I find 'chown -R luser:luser /var/www/html' to be a suitable
> solution. You can also 'ln -s /var/www/html ~/public_html' and then any
> scripts or html editing apps that look in your home directory will be
> happy, but you don't need to worry about enabling home directory support in
> httpd and SELinux.
>
Yes, that's one way of doing it (the chown) but it's often necessary
to fix things after installations which often have to be done as root
and thus put root owned stuff there.

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


All times are GMT. The time now is 01:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.