Configs

By Lucas, 3 Days ago, written in text.
  1. ===============.htaccess=================
  2.  
  3. # .htaccess file for The Bug Genie
  4.  
  5. # make sure that magic_quotes and register_globals is always off
  6. <IfModule mod_php5.c>
  7.         php_flag magic_quotes_gpc       off
  8.         php_flag register_globals       off
  9. </IfModule>
  10.  
  11. # rewrite rules
  12. <IfModule mod_rewrite.c>
  13.   RewriteEngine On
  14.   RewriteBase /thebuggenie/
  15. # Example:
  16. # RewriteBase /
  17. # or
  18. # RewriteBase /dev/thebuggenie
  19.  
  20.   # skip all hidden files (starting with a .)
  21.   RewriteCond %{REQUEST_URI} \..+$
  22.   RewriteCond %{REQUEST_URI} !\.(html|wsdl|json|xml)$
  23.   RewriteRule .* - [L]
  24.  
  25.   # redirect to front controller
  26.   RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L]
  27.  
  28. </IfModule>
  29.  
  30. # Stop people accessing directories they shouldn't have access to
  31. RedirectMatch 403 ^/\.svn(/|$)
  32.  
  33. =============END .htaccess==============
  34. =============NGINX.conf================
  35.  server {
  36.  
  37.         server_name IRRELEVANT;
  38.         root /var/www/bgenie;
  39.         index index.php;
  40.  
  41.         location / {
  42.             #try_files $uri $uri/ /thebuggenie/index.php?url=$uri;
  43.  
  44.         }
  45.  
  46.         location ~ \.php$ {
  47.             #rewrite ^.+ http://bgenie.ajnstudios.com/index.php?url=$uri;
  48.             fastcgi_split_path_info ^(.+\.php)(/.+)$;
  49.             include fastcgi_params;
  50.             fastcgi_index index.php;
  51.             fastcgi_param  SCRIPT_FILENAME  /var/www/bgenie/$fastcgi_script_nam$
  52.             fastcgi_intercept_errors on;
  53.             fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  54.         }
  55.  
  56.     }
  57. ============END NGINX.conf=============