old_contents:
server {
  server_name default;
  root        /var/www/public;
  index       main.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location /status {
     access_log off;
     allow 172.17.0.0/16;
     deny all;
     include /etc/nginx/fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /status;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
  }

  location /ping {
     access_log off;
     allow all;
     include fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /ping;
     fastcgi_pass unix:/Var/run/php5-fpm.sock;
  }

  location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires       max;
    log_not_found off;
    access_log    off;
  }

  location ~ \.php$ {
    try_files     $uri =404;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}

new_contents:
server {
  server_name default;
  root        /var/www/public;
  index       main.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri.html $uri/ @extensionless-php;
  }

  location @extensionless-php {
    rewrite ^(.*)$ $1.php last;
  }

  location /status {
     access_log off;
     allow 172.17.0.0/16;
     deny all;
     include /etc/nginx/fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /status;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
  }

  location /ping {
     access_log off;
     allow all;
     include fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /ping;
     fastcgi_pass unix:/Var/run/php5-fpm.sock;
  }

  location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires       max;
    log_not_found off;
    access_log    off;
  }

  location ~ \.php$ {
    try_files     $uri =404;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}

subject: Remove .php extensions from url

message: Remove .php extensions from url

license: mit


old_contents:
WSGIPythonPath /path/to/repo/FuzzManager/server
<VirtualHost *:80>
	ServerName fuzzmanager.your.domain

	Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/
	Alias /tests/ /path/to/repo/FuzzManager/server/tests/

	WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py
	WSGIPassAuthorization On

	<Location />
		AuthType Basic
		AuthName "LDAP Login"
		AuthBasicProvider file ldap
		AuthUserFile /path/to/.htpasswd
		# Your LDAP configuration here, including Require directives

		# This user is used by clients to download test cases and signatures
		Require user fuzzmanager
	</Location>

	<Location /crashmanager/rest/>
		Satisfy Any
		Allow from all
	</Location>

	<Directory /path/to/repo/FuzzManager/server>
		<Files wsgi.py>
			Order deny,allow
			Allow from all
		</Files>
	</Directory>
</VirtualHost>

new_contents:
WSGIDaemonProcess fuzzmanager.your.domain python-path=/path/to/repo/FuzzManager/server
WSGIProcessGroup fuzzmanager.your.domain
WSGIApplicationGroup %{GLOBAL}

<VirtualHost *:80>
	ServerName fuzzmanager.your.domain

	Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/
	Alias /tests/ /path/to/repo/FuzzManager/server/tests/

	WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py process-group=fuzzmanager.your.domain
	WSGIPassAuthorization On

	<Location />
		AuthType Basic
		AuthName "LDAP Login"
		AuthBasicProvider file ldap
		AuthUserFile /path/to/.htpasswd
		# Your LDAP configuration here, including Require directives

		# This user is used by clients to download test cases and signatures
		Require user fuzzmanager
	</Location>

	<Location /crashmanager/rest/>
		Satisfy Any
		Allow from all
	</Location>

	<Location /ec2spotmanager/rest/>
		Satisfy Any
		Allow from all
	</Location>

	<Directory /path/to/repo/FuzzManager/server>
		<Files wsgi.py>
			Order deny,allow
			Allow from all
		</Files>
	</Directory>
</VirtualHost>

subject: Update example vhost file for Apache2

message: Update example vhost file for Apache2