Check which Apache modules are loaded
Answer:
To check which Apache modules are loaded, in RHEL/Fedora/CentOS, type
# httpd -M
In Debian/Ubuntu
# sudo apache2ctl -M
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Check which Apache modules are loaded
Answer:
To check which Apache modules are loaded, in RHEL/Fedora/CentOS, type
# httpd -M
In Debian/Ubuntu
# sudo apache2ctl -M
How to deny access for Subversion (svn) related files in Apache?
Answer:
To deny access for Subversion (svn) related files under Apache, add the following lines to the Apache configuration (httpd.conf)
<DirectoryMatch .*\.svn/.*>
Deny From All
</DirectoryMatch>
And restart Apache to take effect.
# apachectl -k graceful
How to tell if Apache 2 is using prefork or worker MPM?
Answer:
If you are running in Red Hat Linux/ Fedora/ CentOS
# httpd -V
....
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
...
If you are running in Debian/ Ubuntu, you can use apache2 -V, which get the same output as above.
Installing Nginx in Ubuntu
Answer:
1. Using aptitude
# sudo aptitude install nginx
2. Start it
# sudo /etc/init.d/nginx start
3. Stop it
# sudo /etc/init.d/nginx stop
4. Restart it
# sudo /etc/init.d/nginx restart
Adding SSL suport in Nginx
Answer:
Assume you have got your certificate file (server.crt) from a CA, and you also have a private key (server.key).
1. Compile Nginx to support SSL
# ./configure --with-http_ssl_module
2. Add the following line in nginx.conf
server {
server_name YOUR_DOMAINNAME_HERE;
listen 443;
ssl on;
ssl_certificate /usr/local/nginx/conf/server.crt;
ssl_certificate_key /usr/local/nginx/conf/server.key;
}
3. Restart Nginx
Reference: http://wiki.nginx.org/NginxHttpSslModule