List your Apache virtual hosts
21/05/2010apache2ctl -t -D DUMP_VHOSTS
small snippets of webmonkey wisdom
This snippet will rewrite all requests to the page iphone.html when viewed on iPhone or iPod Touch. Requests for .gif and .css files are not rewritten, so you can include stylesheets and images in your iPhone-specific page.
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} .*Mobile.*Safari RewriteRule !\.(gif|css)$ /iphone.html [L]
Source: http://webdirect.no/mobile/apache-rewrite-rule-for-iphone-users/
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
cd /home/httpd/vhosts/domain.com/conf
<Directory /home/httpd/vhosts/domain.com/httpdocs> php_admin_value open_basedir none </Directory>
/usr/local/psa/admin/sbin/websrvmng -a -v
Useful when closing a site for maintenance:
RewriteEngine On RewriteCond %{REMOTE_ADDR} !^xxx.xxx.xxx.xxx$ RewriteRule !\.(gif|css)$ closed.php
(Where xxx.xxx.xxx.xxx is your local IP address.)
Allows requests from the specified IP, but everyone else gets the closed page. Allows requests for .gif and .css files so we can display the website logo on the closed page, and use the stylesheet.