Search:

Dream

Server

Info

edit SideBar

Server / Httpd

HTTPD

sudo /sbin/chkconfig --levels 235 httpd on start Apache on boot
sudo emacs /etc/sysconfig/iptables

Look at this code. Add the line between the "PUT THIS LINE HERE" tags after line 23.

22: -A INPUT -s 209.243.33.139/32 -p tcp -m state --state NEW -m tcp --dport 5666 -j ACCEPT
23: -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
<<PUT LINE THIS HERE>>-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT<<PUT THIS LINE HERE>>

sudo service iptables restart restart iptables with these new rules

sudo service httpd start start Apache now

To Give Individuals Their Own Public HTML Directory...

...use the following alias. It serves "/PLACE/on/SYSTEM" at http://hostname/entropy, instead of a directory named "entropy" in the base web directory. (The base web directory is typically /var/www/html by default, in CentOS)
This allows public html directories to exist in user home directories, rather than only in directories that require root (sudo) permissions.

sudo emacs /etc/httpd/conf/httpd.conf Just before other aliases in /etc/httpd/conf/httpd.conf add:

Alias /entropy "/PLACE/on/SYSTEM"
<Directory "/PLACE/on/SYSTEM">
   Order allow,deny
   Allow from all
</Directory>

sudo service httpd reload reload Apache now

Making a group editable web directory

groupadd dreamers Make the group
cd /var/www/html Switch to your html directory
sudo mkdir dream Make the directory
sudo chgrp dreamers dream Give that directory the dreamers group
sudo chmod 2775 dream Make it group sticky there
sudo usermod -a -G dreamers myuser Add myuser to the dreamers group if the myuser acct already exists


Page last modified on May 30, 2013, at 07:15 PM