FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-28-2007, 04:38 PM
Timothy Selivanow
 
Default Where do you put all your HTML stuff on a home Linux server?

On Sat, 2007-12-29 at 03:49 +1030, Tim wrote:
> 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.


I've used this method before also. I've found it to be the most
reasonable for what I've needed to work with.


--Tim
__________________________________________________ ___________________________
/ AMAZING BUT TRUE ...
| If all the salmon caught in Canada in one year were laid end to end |
across the Sahara Desert, the smell would be absolutely awful. /
-----------------------------------------------------------------------------


/
( )
.( o ).

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 04:40 PM
Chris G
 
Default Where do you put all your HTML stuff on a home Linux server?

On Fri, Dec 28, 2007 at 12:23:55PM -0500, Felix Miata wrote:
> 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.

That's probably a bit OTT for me, the only 'world' that sees 99% of my
web pages is me so having a 'development' area separate from the
actual served pages is unnecessary really.

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 05:00 PM
"Alan"
 
Default 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.

If you use the home directory option with ~/public_html, you need to make
sure that the home directories have the executable bit set. (It does not
need read or write, only execute.) Apache needs this to be able to
traverse the file structure to get to the files.

Symlinking stuff out of var into home directories (or visaversa) is just a
bad idea. You will then need to make sure that FollowSymlinks is set and
that just opens more security issues.

User directories are not usually turned on in the httpd.conf file by
default. You will probably have to uncomment some things and restart the
system to get it to work correctly.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 07:24 PM
Matthew Saltzman
 
Default Where do you put all your HTML stuff on a home Linux server?

On Fri, 2007-12-28 at 17:36 +0000, Chris G wrote:
> 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.
>

For example, there was a long thread recently in fedora-devel-list on
whether distributions could impose any structure at all on the contents
of /srv. I don't recall if any firm conclusions were reached, but for
now, I don't think you'll see RPMs (from Fedora, anyway) making any use
of it.

My take would be that if I'm doing a fresh install on an existing
machine, I should be able to blow away the contents of /var without
worrying that I'm destroying user data. So things
like /var/www, /var/cvs, /var/spool/mail, /var/spool/mqueue, /var/lib/<databases>, etc., should really be in /srv. But there are definitely different views on this.

> Thanks for the pointer.
>
--
Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 08:19 PM
John Summerfield
 
Default Where do you put all your HTML stuff on a home Linux server?

Robert P. J. Day wrote:

/srv


Careful with that, SUSE has used it for years. Best not to use it
differently from what SUSE does, as skills/documentation/configuration
are all less transferable.





--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 08:28 PM
John Summerfield
 
Default Where do you put all your HTML stuff on a home Linux server?

Matthew Saltzman wrote:

On Fri, 2007-12-28 at 17:36 +0000, Chris G wrote:

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.



For example, there was a long thread recently in fedora-devel-list on
whether distributions could impose any structure at all on the contents
of /srv. I don't recall if any firm conclusions were reached, but for
now, I don't think you'll see RPMs (from Fedora, anyway) making any use
of it.

My take would be that if I'm doing a fresh install on an existing
machine, I should be able to blow away the contents of /var without
worrying that I'm destroying user data. So things
like /var/www, /var/cvs, /var/spool/mail, /var/spool/mqueue, /var/lib/<databases>, etc., should really be in /srv. But there are definitely different views on this.


That's pretty much how SUSE has done it for years (I don't know the
details, and I don't have a SUSE system readily to hand), and that would
be why it's in the standard. Best, if you use it, to follow SUSE practice.


What I've settled on on RedHattish systems is
/var/www/<accountname>/<vhostname>


/var/www/localsites/<accountname>/<vhostname> is slightly more robust,
it's not going to conflict with anything the vendor does.


If you want to protect things in case of upgrade, make one or more
levels a separate filesystem that's ignored (Or better, absent) during
upgrade.




--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-28-2007, 08:54 PM
Tim
 
Default Where do you put all your HTML stuff on a home Linux server?

Chris Snook:
>> 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 G:
> 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.

It's usually user-written files that a user will keep on tweaking.
Other things installed as root probably only need some initial
customisation (e.g. adding your own search engine), and occasional
tweaking, so it's not such an annoyance to "su -" for them.

If one plays with blogs, etc., through an interface, *that* *interface*
should be handling correct ownership and permissions.

--
(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
 
Old 12-28-2007, 08:59 PM
Tim
 
Default Where do you put all your HTML stuff on a home Linux server?

On Fri, 2007-12-28 at 17:05 +0000, Chris G wrote:
> Is it what /srv is intended for? All there is in my /srv is a
> bittorrent directory.

I seem to recall a little bit of customising was required if you wanted
to webserve from within /srv, and have SELinux minding the shop. It's a
long while since I went down that route, I can't remember if it was a
case of manually setting appropriate contexts, some rules, or just
starting off from a predicted /srv/www path.

I set one up, that way, about two years ago, and I haven't messed with
it since. That's one of those things that I like about Linux - once you
get it right, it usually stays that way.

--
(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
 
Old 12-29-2007, 12:28 AM
"Michael A. Peters"
 
Default Where do you put all your HTML stuff on a home Linux server?

Matthew Saltzman wrote:

For example, there was a long thread recently in fedora-devel-list on
whether distributions could impose any structure at all on the contents
of /srv. I don't recall if any firm conclusions were reached, but for
now, I don't think you'll see RPMs (from Fedora, anyway) making any use
of it.

BitTorrent already does.
MySQL should.

The MySQL database by default SHOULD be /srv/mysql - and on all my
installs, it gets changed to that.


I personally leave the default for httpd alone - but any and all virtual
hosts are defined in their own .conf file and point to
/srv/domain.tld/www for their document root.


But yes - some packages do, and others (like databases) should make use
of /srv


In my opinion anyway.
Of course, opinions are like ego's - everybody has got one.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 10:14 AM
"Michael A. Peters"
 
Default 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.

I use /srv
as root:
mkdir -p /srv/www.hostname.tld/www
chown -R user:group /srv/www.hostname

You then create a file in /etc/httpd.conf/ that points to
/srv/www.hostname.tld/www as the DocumentRoot


Works for me.

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

Thread Tools




All times are GMT. The time now is 04:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org