Common apache related command
-restart
/etc/init.d/apache2 restart
-reinstall
-reinstall configuration files
apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common
-fully remove apache
apt-get purge apache2.2-common
apt-get remove --purge apache2 apache2-utils
-install apache
apt-get install apache2
Virtual Host
vi /etc/apache2/sites-available/adabi
ServerAdmin webmaster@localhost
ServerName adabi
DocumentRoot /var/www/adabi
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
edit /etc/apache2/conf.d/fqdn
ServerName localhost
edit
/etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost.localdomain asf
127.0.0.1 localhost.localdomain adabi
127.0.0.1 localhost.localdomain open
activate virtual host :
a2dissite default
a2ensite adabi
/etc/init.d/apache2 restart
Run, Stop, Test, And Restart Apache
/usr/sbin/apache2ctl start
/usr/sbin/apache2ctl stop
/usr/sbin/apache2ctl restart
service apache2 restart
/usr/sbin/apache2ctl configtest ::test configuration
No comments:
Post a Comment