A Qcodo based CMS/ecommerce framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

340 lines
12 KiB

12 years ago
  1. <VirtualHost *:80>
  2. ServerName www.your_domain_name.com
  3. ServerAlias your_domain_name.com
  4. ServerAdmin support@your_domain_name.com
  5. DocumentRoot /var/www/quasi
  6. RewriteEngine on
  7. #allow SEO friendly URLS .. breaks AJAX, FIXME
  8. # RewriteCond %{REQUEST_URI} !^/index\.php.*
  9. # RewriteCond %{REQUEST_URI} !/.*/assets/.*
  10. # RewriteCond %{REQUEST_URI} !^/admin/?.*
  11. # RewriteRule ^(.*)$ /index.php/$1 [L]
  12. <Directory />
  13. Options FollowSymLinks
  14. AllowOverride None
  15. Order Deny,Allow
  16. Deny from All
  17. </Directory>
  18. <Directory /var/www/quasi>
  19. Options SymLinksIfOwnerMatch
  20. AllowOverride None
  21. Order Allow,Deny
  22. allow from all
  23. </Directory>
  24. <Directory /var/www/quasi/admin>
  25. RedirectMatch ^.*$ https://www.your_domain_name.com/admin
  26. Order Deny,Allow
  27. Deny from All
  28. Allow from 127.0.0.1
  29. </Directory>
  30. <Directory /var/www/quasi/includes>
  31. Order Deny,Allow
  32. Deny from All
  33. </Directory>
  34. <Directory /var/www/quasi/doc>
  35. Order Deny,Allow
  36. Deny from All
  37. </Directory>
  38. <Directory /var/www/quasi/core>
  39. Order Deny,Allow
  40. Deny from All
  41. </Directory>
  42. <Directory /var/www/quasi/contrib>
  43. Order Deny,Allow
  44. Deny from All
  45. </Directory>
  46. <Directory /var/www/quasi/generated>
  47. Order Deny,Allow
  48. Deny from All
  49. </Directory>
  50. <Directory /var/www/quasi/local>
  51. Order Deny,Allow
  52. Deny from All
  53. </Directory>
  54. <Directory /var/www/quasi/panelizer>
  55. Order Deny,Allow
  56. Deny from All
  57. </Directory>
  58. <Location /core/assets>
  59. Order Deny,Allow
  60. Allow from all
  61. </Location>
  62. <Location /contrib/assets>
  63. Order Deny,Allow
  64. Allow from all
  65. </Location>
  66. <Location /local/assets>
  67. Order Deny,Allow
  68. Allow from all
  69. </Location>
  70. # Reduce the time dynamically generated HTML pages are cache-able.
  71. <IfModule mod_expires.c>
  72. # Enable expirations.
  73. ExpiresActive On
  74. # Cache all files for 2 weeks after access (A).
  75. ExpiresDefault A1209600
  76. # Do not cache dynamically generated pages.
  77. ExpiresByType text/html A1
  78. </IfModule>
  79. # <Directory ~ /var/www/quasi/!(admin)>
  80. # This directive allows us to redirect all random other requests
  81. # back to our controller
  82. # RedirectMatch ^/$ /
  83. # </Directory>
  84. # Possible values include: debug, info, notice, warn, error, crit,
  85. # alert, emerg.
  86. LogLevel warn
  87. CustomLog /var/log/apache2/your_domain_name_live_access.log combined
  88. ErrorLog /var/log/apache2/your_domain_name_live_error.log
  89. BrowserMatch ".*MSIE.*" \
  90. nokeepalive ssl-unclean-shutdown \
  91. downgrade-1.0 force-response-1.0
  92. </VirtualHost>
  93. <IfModule mod_ssl.c>
  94. <VirtualHost *:443>
  95. ServerName quasi.erikwinn.com
  96. # ServerAlias your_domain_name.com
  97. ServerAdmin erik@your_domain_name.com
  98. DocumentRoot /var/www/quasi
  99. <Directory />
  100. Options FollowSymLinks
  101. AllowOverride None
  102. Order Deny,Allow
  103. Deny from All
  104. </Directory>
  105. <Directory /var/www/quasi>
  106. Options SymLinksIfOwnerMatch
  107. AllowOverride None
  108. Order Allow,Deny
  109. allow from all
  110. </Directory>
  111. <Directory /var/www/quasi/admin>
  112. Options SymLinksIfOwnerMatch
  113. AllowOverride None
  114. # Enable this and create an htpasswd file for better security:
  115. # AuthUserFile /var/www/quasi/admin/.htpasswd
  116. # AuthGroupFile /dev/null
  117. # AuthType Basic
  118. # AuthName Protected
  119. #AuthPAM_Enabled off
  120. # Require valid-user
  121. Order Deny,Allow
  122. Deny from All
  123. Allow from 127.0.0.1
  124. </Directory>
  125. <Directory /var/www/quasi/includes>
  126. Order Deny,Allow
  127. Deny from All
  128. </Directory>
  129. <Directory /var/www/quasi/doc>
  130. Order Deny,Allow
  131. Deny from All
  132. </Directory>
  133. <Directory /var/www/quasi/core>
  134. Order Deny,Allow
  135. Deny from All
  136. </Directory>
  137. <Directory /var/www/quasi/contrib>
  138. Order Deny,Allow
  139. Deny from All
  140. </Directory>
  141. <Directory /var/www/quasi/generated>
  142. Order Deny,Allow
  143. Deny from All
  144. </Directory>
  145. <Directory /var/www/quasi/local>
  146. Order Deny,Allow
  147. Deny from All
  148. </Directory>
  149. <Location /core/assets>
  150. Order Deny,Allow
  151. Allow from all
  152. </Location>
  153. <Location /contrib/assets>
  154. Order Deny,Allow
  155. Allow from all
  156. </Location>
  157. <Location /local/assets>
  158. Order Deny,Allow
  159. Allow from all
  160. </Location>
  161. # Reduce the time dynamically generated HTML pages are cache-able.
  162. <IfModule mod_expires.c>
  163. # Enable expirations.
  164. ExpiresActive On
  165. # Cache all files for 2 weeks after access (A).
  166. ExpiresDefault A1209600
  167. # Do not cache dynamically generated pages.
  168. ExpiresByType text/html A1
  169. </IfModule>
  170. # <Directory ~ /var/www/quasi/!(admin)>
  171. # # This directive allows us to redirect all random other requests
  172. # back to our controller
  173. # RedirectMatch ^/$ /
  174. # </Directory>
  175. # Possible values include: debug, info, notice, warn, error, crit,
  176. # alert, emerg.
  177. LogLevel warn
  178. CustomLog /var/log/apache2/your_domain_name_live_ssl_access.log combined
  179. ErrorLog /var/log/apache2/your_domain_name_live_ssl_error.log
  180. # SSL Engine Switch:
  181. # Enable/Disable SSL for this virtual host.
  182. SSLEngine on
  183. # A self-signed (snakeoil) certificate can be created by installing
  184. # the ssl-cert package. See
  185. # /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
  186. # If both key and certificate are stored in the same file, only the
  187. # SSLCertificateFile directive is needed.
  188. SSLCertificateFile /etc/apache2/apache.pem
  189. #
  190. #
  191. #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  192. # Server Certificate Chain:
  193. # Point SSLCertificateChainFile at a file containing the
  194. # concatenation of PEM encoded CA certificates which form the
  195. # certificate chain for the server certificate. Alternatively
  196. # the referenced file can be the same as SSLCertificateFile
  197. # when the CA certificates are directly appended to the server
  198. # certificate for convinience.
  199. #SSLCertificateChainFile /etc/ssl/certs/your_domain_name_com.ca-bundle
  200. # Certificate Authority (CA):
  201. # Set the CA certificate verification path where to find CA
  202. # certificates for client authentication or alternatively one
  203. # huge file containing all of them (file must be PEM encoded)
  204. # Note: Inside SSLCACertificatePath you need hash symlinks
  205. # to point to the certificate files. Use the provided
  206. # Makefile to update the hash symlinks after changes.
  207. #SSLCACertificatePath /etc/ssl/certs/
  208. #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
  209. # Certificate Revocation Lists (CRL):
  210. # Set the CA revocation path where to find CA CRLs for client
  211. # authentication or alternatively one huge file containing all
  212. # of them (file must be PEM encoded)
  213. # Note: Inside SSLCARevocationPath you need hash symlinks
  214. # to point to the certificate files. Use the provided
  215. # Makefile to update the hash symlinks after changes.
  216. #SSLCARevocationPath /etc/apache2/ssl.crl/
  217. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  218. # Client Authentication (Type):
  219. # Client certificate verification type and depth. Types are
  220. # none, optional, require and optional_no_ca. Depth is a
  221. # number which specifies how deeply to verify the certificate
  222. # issuer chain before deciding the certificate is not valid.
  223. #SSLVerifyClient require
  224. #SSLVerifyDepth 10
  225. # Access Control:
  226. # With SSLRequire you can do per-directory access control based
  227. # on arbitrary complex boolean expressions containing server
  228. # variable checks and other lookup directives. The syntax is a
  229. # mixture between C and Perl. See the mod_ssl documentation
  230. # for more details.
  231. #<Location />
  232. #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  233. # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  234. # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  235. # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  236. # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
  237. # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  238. #</Location>
  239. # SSL Engine Options:
  240. # Set various options for the SSL engine.
  241. # o FakeBasicAuth:
  242. # Translate the client X.509 into a Basic Authorisation. This means that
  243. # the standard Auth/DBMAuth methods can be used for access control. The
  244. # user name is the `one line' version of the client's X.509 certificate.
  245. # Note that no password is obtained from the user. Every entry in the user
  246. # file needs this password: `xxj31ZMTZzkVA'.
  247. # o ExportCertData:
  248. # This exports two additional environment variables: SSL_CLIENT_CERT and
  249. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  250. # server (always existing) and the client (only existing when client
  251. # authentication is used). This can be used to import the certificates
  252. # into CGI scripts.
  253. # o StdEnvVars:
  254. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  255. # Per default this exportation is switched off for performance reasons,
  256. # because the extraction step is an expensive operation and is usually
  257. # useless for serving static content. So one usually enables the
  258. # exportation for CGI and SSI requests only.
  259. # o StrictRequire:
  260. # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  261. # under a "Satisfy any" situation, i.e. when it applies access is denied
  262. # and no other module can change it.
  263. # o OptRenegotiate:
  264. # This enables optimized SSL connection renegotiation handling when SSL
  265. # directives are used in per-directory context.
  266. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  267. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  268. SSLOptions +StdEnvVars
  269. </FilesMatch>
  270. <Directory /usr/lib/cgi-bin>
  271. SSLOptions +StdEnvVars
  272. </Directory>
  273. # SSL Protocol Adjustments:
  274. # The safe and default but still SSL/TLS standard compliant shutdown
  275. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  276. # the close notify alert from client. When you need a different shutdown
  277. # approach you can use one of the following variables:
  278. # o ssl-unclean-shutdown:
  279. # This forces an unclean shutdown when the connection is closed, i.e. no
  280. # SSL close notify alert is send or allowed to received. This violates
  281. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  282. # this when you receive I/O errors because of the standard approach where
  283. # mod_ssl sends the close notify alert.
  284. # o ssl-accurate-shutdown:
  285. # This forces an accurate shutdown when the connection is closed, i.e. a
  286. # SSL close notify alert is send and mod_ssl waits for the close notify
  287. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  288. # practice often causes hanging connections with brain-dead browsers. Use
  289. # this only for browsers where you know that their SSL implementation
  290. # works correctly.
  291. # Notice: Most problems of broken clients are also related to the HTTP
  292. # keep-alive facility, so you usually additionally want to disable
  293. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  294. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  295. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  296. # "force-response-1.0" for this.
  297. BrowserMatch ".*MSIE.*" \
  298. nokeepalive ssl-unclean-shutdown \
  299. downgrade-1.0 force-response-1.0
  300. </VirtualHost>
  301. </IfModule>