You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hiep Nguyen <hi...@ee.ucr.edu> on 2007/12/11 15:24:54 UTC

[users@httpd] apachectl

hi list

i do a minimal install centos 5, then install apache using yum and
apachectl start and the test page worked.

now i try apachectl status and i got:
The 'links' package is required for this functionality.

how do i install this package?  i tried:

yum install links, but only elinks package return.

thanks,
t. hiep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Hiep Nguyen <hi...@ee.ucr.edu>.
On Tue, 11 Dec 2007, Vincent Bray wrote:

> On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
>> should i change to apache user or something else?  i'll have couple people
>> in this office upload files (.pdf, .php, .js, .doc, .xls, etc...) to
>> /var/www/html/ folder and i don't want to give root password to them.
>
> Don't use the apache user unless the web server needs to be able to
> write to your content. It sounds very much like that's not the case.
>

i'm not quite sure what you meant by "write to your content", but this 
server needs ability to generate pdf files (and save to 
/var/www/html/pdf/)and others.  right now, i use 
apache, php, & mysql to write my website, but i'm sure java and other 
stuffs will be added on later.

is this mean that i have to change /var/www/html/ to apache user?

what is the danger of change /var/www/html/ to apache user?

>> if i leave as root, can i create a few accounts and let them use these
>> accounts to upload files?  is there any problem when the folder is root
>> and files are not root owner?
>
> I'd recommend the following:
>
> * Give everyone their own user account
> * Create a group for the site, something like 'webeditors'
> * Add all your editors to that group
> * Change the group ownership of /var/www/html to that group
> * Change the mode of that directory to 2775
> * Make sure whatever service your editors use to upload (ftp, sftp)
> has umask 002
> * Have at it :-)
>
> If that's too complicated or too fragile (the umask is important, and
> sometimes hard to control) just create a separate user account, chown
> /var/www/html to that user and give the editors the password.
>
> -- 
> noodl
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Vincent Bray <no...@gmail.com>.
On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
> should i change to apache user or something else?  i'll have couple people
> in this office upload files (.pdf, .php, .js, .doc, .xls, etc...) to
> /var/www/html/ folder and i don't want to give root password to them.

Don't use the apache user unless the web server needs to be able to
write to your content. It sounds very much like that's not the case.

> if i leave as root, can i create a few accounts and let them use these
> accounts to upload files?  is there any problem when the folder is root
> and files are not root owner?

I'd recommend the following:

 * Give everyone their own user account
 * Create a group for the site, something like 'webeditors'
 * Add all your editors to that group
 * Change the group ownership of /var/www/html to that group
 * Change the mode of that directory to 2775
 * Make sure whatever service your editors use to upload (ftp, sftp)
has umask 002
 * Have at it :-)

If that's too complicated or too fragile (the umask is important, and
sometimes hard to control) just create a separate user account, chown
/var/www/html to that user and give the editors the password.

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Hiep Nguyen <hi...@ee.ucr.edu>.
On Tue, 11 Dec 2007, Vincent Bray wrote:

> On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
>> thanks.  couple more questions:
>>
>> how do i install/enable mod_status so i can use apachectl status?
>
> I don't remember exactly. There's either going to be a specific config
> file for it in /etc/httpd/conf.d or else you should search
> /etc/httpd/conf/httpd.conf for server-status.
>
>> where is the apache test page?  i don't see anything in /var/www/html/.
>
> You should remove /etc/httpd/conf.d/welcome.conf and restart the
> server. That's what's showing the centos start page.
>
>> i noticed /var/www/html/ is root. am i suppose to upload anything to this
>> folder using root account? if not what account do i use to upload?
>
> This really depends on what you need to serve. If you just want to
> serve a few static resources then putting things in that directory
> should be fine. On the other hand if you want multiple sites then
> you'll need to learn about virtual hosts and settle on a directory
> layout (pretty much everyone has their own preferred way). You should
> also chown that directory so you can work in it without needing root,
> or create a web authoring group etc.
>
>> also, what account do i use to start up httpd service?
>
> Root. It's always necessary to be root to start services which listen
> on network ports <=1024.
>
>> right now, i login as root and execute apachectrl start, but i would like
>> to automatic start up this service during boot.
>
> chkconfig httpd on
>
>> as you know, i'm a newbie to apache.
>
> We all were once :-)
>
> -- 
> noodl
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
thanks vincent.

this server is mainly for internal use only, but it can be used for public 
later. so i want to take time to put in security measures.

no need for virtual host here, b/c i have only one site.  however, i'm not 
sure what to do with /var/www/html/ folder as far as ownership concern.

should i change to apache user or something else?  i'll have couple people 
in this office upload files (.pdf, .php, .js, .doc, .xls, etc...) to 
/var/www/html/ folder and i don't want to give root password to them.

if i leave as root, can i create a few accounts and let them use these 
accounts to upload files?  is there any problem when the folder is root 
and files are not root owner?

please let me know what are most people use?

thanks,
t. hiep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Vincent Bray <no...@gmail.com>.
On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
> thanks.  couple more questions:
>
> how do i install/enable mod_status so i can use apachectl status?

I don't remember exactly. There's either going to be a specific config
file for it in /etc/httpd/conf.d or else you should search
/etc/httpd/conf/httpd.conf for server-status.

> where is the apache test page?  i don't see anything in /var/www/html/.

You should remove /etc/httpd/conf.d/welcome.conf and restart the
server. That's what's showing the centos start page.

> i noticed /var/www/html/ is root. am i suppose to upload anything to this
> folder using root account? if not what account do i use to upload?

This really depends on what you need to serve. If you just want to
serve a few static resources then putting things in that directory
should be fine. On the other hand if you want multiple sites then
you'll need to learn about virtual hosts and settle on a directory
layout (pretty much everyone has their own preferred way). You should
also chown that directory so you can work in it without needing root,
or create a web authoring group etc.

> also, what account do i use to start up httpd service?

Root. It's always necessary to be root to start services which listen
on network ports <=1024.

> right now, i login as root and execute apachectrl start, but i would like
> to automatic start up this service during boot.

chkconfig httpd on

> as you know, i'm a newbie to apache.

We all were once :-)

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Hiep Nguyen <hi...@ee.ucr.edu>.
On Tue, 11 Dec 2007, Vincent Bray wrote:

> On 11/12/2007, Vincent Bray <no...@gmail.com> wrote:
>> On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
>>> yum install links, but only elinks package return.
>>
>> elinks should do fine.
>
> I should also mention that this status option relies on mod_status
> being configured at the usual /server-status address, and that's
> rarely the default.
>
> Depending on how much information you need you might be better off
> finding another way of seeing if apache's running.
>
> -- 
> noodl
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

thanks.  couple more questions:

how do i install/enable mod_status so i can use apachectl status?

where is the apache test page?  i don't see anything in /var/www/html/.

i noticed /var/www/html/ is root. am i suppose to upload anything to this 
folder using root account? if not what account do i use to upload?

also, what account do i use to start up httpd service?

right now, i login as root and execute apachectrl start, but i would like 
to automatic start up this service during boot.

as you know, i'm a newbie to apache.

thank you very much,
t. hiep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Vincent Bray <no...@gmail.com>.
On 11/12/2007, Vincent Bray <no...@gmail.com> wrote:
> On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
> > yum install links, but only elinks package return.
>
> elinks should do fine.

I should also mention that this status option relies on mod_status
being configured at the usual /server-status address, and that's
rarely the default.

Depending on how much information you need you might be better off
finding another way of seeing if apache's running.

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apachectl

Posted by Vincent Bray <no...@gmail.com>.
On 11/12/2007, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
> yum install links, but only elinks package return.

elinks should do fine.

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org