2067 update path

2067 update path

Listen 8080

<VirtualHost *:8080>

  LoadModule php5_module /home/ubuntu/.phpenv/versions/5.6.5/libexec/apache2/libphp5.so

  DocumentRoot /home/ubuntu/project/public/Zed
  ServerName zed.de.spryker.com

  <FilesMatch \.php$>
    SetHandler application/x-httpd-php
  </FilesMatch>

  <Directory /home/ubuntu/project/public/Zed>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all
      Require all granted
  </Directory>

</VirtualHost>

Listen 8080

<VirtualHost *:8080>

  LoadModule php5_module /home/ubuntu/.phpenv/versions/5.6.5/libexec/apache2/libphp5.so

  DocumentRoot /home/ubuntu/zed/public/Zed
  ServerName zed.de.spryker.com

  <FilesMatch \.php$>
    SetHandler application/x-httpd-php
  </FilesMatch>

  <Directory /home/ubuntu/zed/public/Zed>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all
      Require all granted
  </Directory>

</VirtualHost>


add newline at end of file

add newline at end of file

WSGIDaemonProcess osmaxx.dev python-path=/var/www/eda/environment/:/var/www/eda/environment/lib/python3.4/site-packages
WSGIProcessGroup osmaxx.dev

ErrorLog /var/log/apache2/osmaxx.log
WSGIScriptAlias / /var/www/eda/projects/osmaxx/wsgi.py

Alias "/static/admin" "/var/www/eda/environment/lib/python3.4/site-packages/django/contrib/admin/static/admin"
Alias "/static/excerptexport" "/var/www/eda/projects/excerptexport/static/excerptexport"

<Directory /var/www/eda/projects>
    <Files osmaxx/wsgi.py>
        Require all granted
    </Files>
</Directory>


update vs site

update vs site

server {
  server_name mobile.viewspeaker.com mobile.viewspeaker.cat;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /admin/index.php;
  }

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

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

server {
  server_name mobile.api.viewspeaker.com mobile.api.viewspeaker.cat;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.php$ {
    try_files     $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}

server {
  server_name viewspeaker.com www.viewspeaker.com;
  root        /var/www/vs;
  index       index.html;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /index.html;
  }

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

  location ~ \.php$ {
    try_files     $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}


the vhost also needs some care

the vhost also needs some care

<VirtualHost *:80>
    WSGIScriptReloading On
    WSGIDaemonProcess %PROJECT%-%ENV%
    WSGIProcessGroup %PROJECT%-%ENV%
    WSGIApplicationGroup %PROJECT%-%ENV%
    WSGIPassAuthorization On

    WSGIScriptAlias / %ROOT%/%PROJECT%/%PROJECT%/wsgi.py

    ServerName %DOMAIN%
    ServerAlias www.%DOMAIN%

    <Location "/">
        Order Allow,Deny
        Allow from all
    </Location>

    <Location "/static">
        SetHandler None
    </Location>
    Alias /static %ROOT%/%PROJECT%/static

    <Location "/media">
        SetHandler None
    </Location>
    Alias /media %ROOT%/%PROJECT%/media

    Alias /robots.txt %ROOT%/%PROJECT%/static/robots.txt

    ErrorLog /var/log/apache2/%DOMAINROJECT%_error.log
    LogLevel info
    CustomLog /var/log/apache2/%DOMAIN%_access.log combined
</VirtualHost>

<VirtualHost *:80>
    WSGIScriptReloading On
    WSGIDaemonProcess %PROJECT%-%ENV%
    WSGIProcessGroup %PROJECT%-%ENV%
    WSGIApplicationGroup %PROJECT%-%ENV%
    WSGIPassAuthorization On

    WSGIScriptAlias / %ROOT%/%ENV%/%PROJECT%/%PROJECT%/wsgi.py

    ServerName %PROJECT%.%DOMAIN%

    <Location "/">
        Order Allow,Deny
        Allow from all
    </Location>

    <Location "/static">
        SetHandler None
    </Location>
    Alias /static %ROOT%/%ENV%/%PROJECT%/static

    <Location "/media">
        SetHandler None
    </Location>
    Alias /media %ROOT%/%ENV%/%PROJECT%/media

    ErrorLog /var/log/apache2/%PROJECT%_%ENV%_error.log
    LogLevel info
    CustomLog /var/log/apache2/%PROJECT%_%ENV%_access.log combined
</VirtualHost>


Remove .php extensions from url

Remove .php extensions from url

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;
  }
}

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;
  }
}


Set default vhost expires off for assets

server {
  server_name default;
  root        /var/www/web;
  index       index.php;

  client_max_body_size 16M;
  fastcgi_read_timeout 60;

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

  location ~ ^/(index|index_dev)\.php(/|$) {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
  }

  location ~ \.php$ {
    return 404;
  }

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

server {
  server_name default;
  root        /var/www/web;
  index       index.php;

  client_max_body_size 16M;
  fastcgi_read_timeout 60;

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

  location ~ ^/(index|index_dev)\.php(/|$) {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
  }

  location ~ \.php$ {
    return 404;
  }

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


Add DocumentRoot to apache config

Add DocumentRoot to apache config


nginx configuration

nginx configuration

server {
    server_name localhost;
    root LOCAL_DIR/web;

    index  app_dev.php;

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

    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
}

server {
    server_name localhost;
    root LOCAL_DIR/web;

    index  app_dev.php;

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

    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
}


nginx configuration

nginx configuration

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    index  app.php;

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

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    location ~ \.php($|/) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index app.php;
        fastcgi_pass_header Authorization;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }

    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_disable     "MSIE [1-6]\."
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    index  app_dev.php;

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

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }

    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_disable     "MSIE [1-6]\."
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}


fix virtual root

fix virtual root

#
# This file is part of the Berny\Project-Manager package
#
# (c) Berny Cantos <be@rny.cc>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#

<VirtualHost *:80>
    ServerName localhost.devel
    ServerAlias *.devel

    DocumentRoot /var/www/public
    VirtualDocumentRoot /var/www/public/%-1+
    php_admin_value auto_prepend_file /var/www/boot/docroot.php
    UseCanonicalName Off
    AcceptPathInfo On

    # combined log for all virtual hosts
    # can be split per-vhost based on the first field
    LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    CustomLog  /var/www/log/access.log vcommon
    ErrorLog   /var/www/log/errors.log

    <IfModule mod_rewrite.c>
        RewriteLog /var/www/log/rewrite.log
        RewriteLogLevel 1
    </IfModule>
</VirtualHost>

#
# This file is part of the Berny\Project-Manager package
#
# (c) Berny Cantos <be@rny.cc>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#

<VirtualHost *:80>
    ServerName localhost.devel
    ServerAlias *.devel

    DocumentRoot /var/www/public
    VirtualDocumentRoot /var/www/public/%-2+
    php_admin_value auto_prepend_file /var/www/boot/docroot.php

    # combined log for all virtual hosts
    # can be split per-vhost based on the first field
    LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    CustomLog  /var/www/log/access.log vcommon
    ErrorLog   /var/www/log/errors.log

    UseCanonicalName Off
    AcceptPathInfo On

    <IfModule mod_rewrite.c>
        RewriteLog /var/www/log/rewrite.log
        RewriteLogLevel 1
    </IfModule>
</VirtualHost>


Update example vhost file for Apache2

Update example vhost file for Apache2

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>

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>


travis script

travis script

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;
    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app_dev\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }
    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    index  app.php;

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

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    location ~ \.php($|/) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index app.php;
        fastcgi_pass_header Authorization;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }

    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_disable     "MSIE [1-6]\."
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}


behat and Selenium (Under development)

behat and Selenium (Under development)

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    location / {
        # try to serve file directly, fallback to rewrite
        try_files $uri @rewriteapp;
    }

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    location @rewriteapp {
        # rewrite all to app_dev.php
        rewrite ^(.*)$ /app_dev.php/$1 last;
    }

    location ~ ^/(app|app_dev)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    location / {
        # try to serve file directly, fallback to rewrite
        try_files $uri @rewriteapp;
    }

    location @rewriteapp {
        # rewrite all to app_dev.php
        rewrite ^(.*)$ /app_dev.php/$1 last;
    }

    location ~ ^/(app|app_dev)\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}


set the app as the default server

set the app as the default server

server {
        listen 80 default_server;

        root /var/www/app;
        index index.html;

        server_name ~^particulier(-dev|-test|-local|)\.api\.gouv\.fr$ default;

        location /docs {
          root /var/www;
          add_header 'Access-Control-Allow-Origin' '*';
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^particulier(-dev|-test|-local|)\.api\.gouv\.fr$ default;

        location /docs {
          root /var/www;
          add_header 'Access-Control-Allow-Origin' '*';
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}


damette

damette

<VirtualHost *:80>
    WSGIScriptReloading On
    WSGIDaemonProcess %PROJECT%-%ENV%
    WSGIProcessGroup %PROJECT%-%ENV%
    WSGIApplicationGroup %PROJECT%-%ENV%
    WSGIPassAuthorization On

    WSGIScriptAlias / %ROOT%/%PROJECT%/%PROJECT%/wsgi.py

    ServerName %DOMAIN%
    ServerAlias www.%DOMAIN%

    <Location "/">
        Order Allow,Deny
        Allow from all
    </Location>

    <Location "/static">
        SetHandler None
    </Location>
    Alias /static %ROOT%/%PROJECT%/static

    <Location "/media">
        SetHandler None
    </Location>
    Alias /media %ROOT%/%PROJECT%/media

    Alias /robots.txt %ROOT%/%PROJECT%/static/robots.txt

    ErrorLog /var/log/apache2/%DOMAIN%_error.log
    LogLevel info
    CustomLog /var/log/apache2/%DOMAIN%_access.log combined
</VirtualHost>

<VirtualHost *:80>
    WSGIScriptReloading On
    WSGIDaemonProcess %PROJECT%-%ENV%
    WSGIProcessGroup %PROJECT%-%ENV%
    WSGIApplicationGroup %PROJECT%-%ENV%
    WSGIPassAuthorization On

    WSGIScriptAlias / %ROOT%/%PROJECT%/%PROJECT%/wsgi.py

    ServerName %DOMAIN%
    ServerAlias www.%DOMAIN%

    <Location "/">
        Order Allow,Deny
        Allow from all
    </Location>

    <Location "/static">
        SetHandler None
    </Location>
    Alias /static %ROOT%/%PROJECT%/static

    <Location "/media">
        SetHandler None
    </Location>
    Alias /media %ROOT%/%PROJECT%/media

    Alias /robots.txt %ROOT%/%PROJECT%/static/robots.txt

    ErrorLog /var/log/apache2/%DOMAINROJECT%_error.log
    LogLevel info
    CustomLog /var/log/apache2/%DOMAIN%_access.log combined
</VirtualHost>


Improved location blocks for nginx configs, including fix for url params breaking in views ajax and batch api

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location ~ \.php$ {
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    #try_files $uri $uri/ index.php /index.php$is_args$args;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    #fastcgi_pass 127.0.0.1:9000;
    fastcgi_read_timeout 600;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    fastcgi_param APP_ENV dev;
  }

  location / {
    index  index.html index.htm index.php;
    try_files $uri @rewrite;
    error_page 405 = $uri;

  }

  location @rewrite {
    rewrite ^ /index.php;
  }

}

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.(hh|php) {
    proxy_intercept_errors on;

    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/php/php7.0-fpm.sock;
    #fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }

}


nginx configuration

nginx configuration

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    index  app.php;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;

    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_disable     "MSIE [1-6]\."
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;
    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app_dev\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }
    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}


Bugfix: Fix alias for apache to server static files. Fixes #3

WSGIDaemonProcess osmaxx.dev python-path=/var/www/eda/environment/:/var/www/eda/environment/lib/python3.4/site-packages
WSGIProcessGroup osmaxx.dev

ErrorLog /var/log/apache2/osmaxx.log
WSGIScriptAlias / /var/www/eda/projects/osmaxx/wsgi.py

Alias "/static/admin" "/var/www/eda/environment/lib/python3.4/site-packages/django/contrib/admin/static/admin"
Alias /resources/ /var/www/eda/projects/resources/public/

<Directory /var/www/eda/projects>
    <Files osmaxx/wsgi.py>
        Require all granted
    </Files>
</Directory>


Update default.vhost

Update default.vhost


mod nginx config

mod nginx config

server {
  server_name default;
  root      /var/www/app/public;
  index     index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

  # location ~ ^/macaron((/)?(.+))?$ {
  #   root /var/www/app/public;
  #   try_files $1 /macaron/index.php?$query_string;
  #
  #   location ~ \.php$ {
  #       include fastcgi_params;
  #       #try_files                $uri = 404;
  #       include                  fastcgi_params;
  #       fastcgi_param            SCRIPT_FILENAME $document_root$fastcgi_script_name;
  #       fastcgi_param            PATHINFO        $fastcgi_path_info;
  #       fastcgi_param            PATH_TRANSLATED $document_root$fastcgi_path_info;
  #       fastcgi_split_path_info  ^(.+¥.php)(/.+)$;
  #       fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  #       fastcgi_index index.php;
  #   }
  # }

    location ~ \.php$ {
          include fastcgi_params;
          #try_files                $uri = 404;
          include                  fastcgi_params;
          fastcgi_param            SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param            PATHINFO        $fastcgi_path_info;
          fastcgi_param            PATH_TRANSLATED $document_root$fastcgi_path_info;
          fastcgi_split_path_info  ^(.+¥.php)(/.+)$;
          fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
          fastcgi_index index.php;
    }

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

}

server {
  server_name default;
  root      /var/www/macaron/public;
  index     index.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 192.168.99.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;
    fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }
}


nginx configuration

nginx configuration

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    index  app_dev.php;

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

    # static content
    location ~* ^.+\.(wsf|xml|pdf|doc|jpg|jpeg|gif|css|png|js|ico|ttf|eot|otf|svg)$ {
        expires 15d;
    }

    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }

    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_disable     "MSIE [1-6]\."
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}


Signatures (#323)

Signatures (#323)

* Update example default.vhost
* The default.vhost file misses two aliases that allow downloading signatures.zip

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/
    Alias /crashmanager/tests/ /path/to/FuzzManager/server/tests/
    Alias /crashmanager/files/ /path/to/FuzzManager/server/files/

	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>

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>


updated default vhost for php 7

updated default vhost for php 7

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.(hh|php) {
    proxy_intercept_errors on;

    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/php/php7.0-fpm.sock;
    #fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }

}

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.(hh|php) {
    proxy_intercept_errors on;
    error_page 502 = @fpm;

    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;
    fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }

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

}


*.gouv.fr site can access the swagger documentation

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$ default;

        location /docs {
          root /var/www;
          add_header 'Access-Control-Allow-Origin' '*.gouv.fr';
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$ default;

        location /docs {
          root /var/www;
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}


Delete mataharimall.vhost

Delete mataharimall.vhost

remove another vhost

server {
  server_name mataharimall.dev alias www.mataharimall.dev;
  root        /html/cf-desktop/public;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /app_dev.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/php/php5.6-fpm.sock;
  }

  location /ping {
     access_log off;
     allow all;
     include fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /ping;
     fastcgi_pass unix:/var/run/php/php5.6-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;
    include /etc/nginx/fastcgi_params;
    fastcgi_index app_dev.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass  unix:/var/run/php/php5.6-fpm.sock;
  }
}


default vhost updated

default vhost updated

server {

  listen *:80;

  server_name default;

  root        /var/www/default;
  index       index.php;

  location ~ \.php$ {

   fastcgi_index index.php;
   fastcgi_split_path_info ^(.+\.php)(/.*)$;
   #try_files $uri $uri/ index.php /index.php$is_args$args;
   include /etc/nginx/fastcgi_params;
   fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
   #fastcgi_pass 127.0.0.1:9000;
   fastcgi_read_timeout 600;
   fastcgi_param SCRIPT_FILENAME $request_filename;
   fastcgi_param APP_ENV dev;
  }

  location / {
   index  index.html index.htm index.php;
   try_files $uri @rewrite;
   error_page 405 = $uri;

  }

  location @rewrite {
   rewrite ^ /index.php;
  }

  sendfile off;

}


Delete cf2.vhost

Delete cf2.vhost

remove another vhost

server {
  server_name cf2.dev;
  root        /html/cf2;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /app_dev.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/php/php5.6-fpm.sock;
  }

  location /ping {
     access_log off;
     allow all;
     include fastcgi_params;
     fastcgi_param SCRIPT_FILENAME /ping;
     fastcgi_pass unix:/var/run/php/php5.6-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;
    include /etc/nginx/fastcgi_params;
    fastcgi_index app_dev.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass  unix:/var/run/php/php5.6-fpm.sock;
  }
}


Update default.vhost

Update default.vhost

server {
  server_name keya;
  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;
  }
}

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;
  }
}


behat and Selenium (Under development)

behat and Selenium (Under development)

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

server {
    listen 80;
    server_name localhost;
    root LOCAL_DIR/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}


add regex to tolerate all env

add regex to tolerate all env

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$ default;

        location /docs {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          rewrite /tech(.*) /$1  break;
          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://tech:4567;
        }

}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name apiparticulier.sgmap.fr default;

        location /docs {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          rewrite /tech(.*) /$1  break;
          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://tech:4567;
        }

}


add url rewritting for tech redirect

add url rewritting for tech redirect

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name apiparticulier.sgmap.fr default;

        location /docs {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          rewrite /tech(.*) /$1  break;
          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://tech:4567;
        }

}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name apiparticulier.sgmap.fr default;

        location /docs {
          root /var/www;
        }

        location /api {

            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host $host;
            proxy_pass http://app:3004;

         }

         location /tech {

             proxy_set_header X-Real-IP  $remote_addr;
             proxy_set_header X-Forwarded-For $remote_addr;
             proxy_set_header Host $host;
             proxy_pass http://tech:4567;

          }

}


redirect to the correct environment

redirect to the correct environment

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(?<env>-dev|-test|-local|)\.sgmap\.fr$;

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location / {
          return         301 $scheme://particulier$env.api.gouv.fr$request_uri;
        }
}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$;

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location / {
          return         301 $scheme://particulier.api.gouv.fr$request_uri;
        }
}


Fix vhost

Fix vhost

server {
  server_name default;
  root        /var/www/web;
  index       index.php;

  client_max_body_size 16M;
  fastcgi_read_timeout 60;

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

  location ~ ^/(index|index_dev)\.php(/|$) {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
  }

  location ~ \.php$ {
    return 404;
  }

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

server {
  server_name default;
  root        /var/www/web;
  index       index.php;

  client_max_body_size 16M;
  fastcgi_read_timeout 60;

  location @rewrite {
    rewrite ^/([^?]*)$ /index.php?/$1 last;
  }

  location / {
    try_files $uri $uri/ @rewrite;
  }

  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_param PATH_INFO $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}


Updated the server name directive in the sample vhost config for the hellworld example.

# Unless otherwise noted, replace all settings w/in curly braces with values
# suited to your own environment.
<VirtualHost *:80>
    ServerName  helloworld.example.sonno.dev
    ServerAdmin {youraddress@you.com}

    DocumentRoot {your/path/to}/examples/helloworld/www
    <Directory {your/path/to}/examples/helloworld/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog {your/path/to/error.log}

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    # Main handler rewrite
    # Do not replace values inside curly braces {} w/in the Location tag!!!
    <Location />
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
    </Location>
</VirtualHost>

# Unless otherwise noted, replace all settings w/in curly braces with values
# suited to your own environment.
<VirtualHost *:80>
    ServerName  example.sonno.dev
    ServerAdmin {youraddress@you.com}

    DocumentRoot {your/path/to}/examples/helloworld/www
    <Directory {your/path/to}/examples/helloworld/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog {your/path/to/error.log}

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    # Main handler rewrite
    # Do not replace values inside curly braces {} w/in the Location tag!!!
    <Location />
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
    </Location>
</VirtualHost>


fix nginx vhost

fix nginx vhost

server {
    listen <YOURIP>:443 ssl;
    server_name <YOURFQDN>;

    ssl_certificate         /etc/nginx/ssl/cpves.pem;
    ssl_certificate_key     /etc/nginx/ssl/cpves.pem;
    ssl_protocols           SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers             HIGH:!aNULL:!MD5;

    access_log /var/www/virtual/cpves/logs/nginx_access.log;
    error_log /var/www/virtual/cpves/logs/nginx_error.log;

    root /var/www/virtual/cpves/html/web;

    index index.php;

    location ~ ^(.*)\/\.(.*)$ {
        return 404;
    }

    location ~ ^(.*)\.php$ {
        try_files $uri =404;

        include       /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/var/www/virtual/cpves/sockets/phpfpm.socket;
    }
}

server {
    listen <YOURIP>:443 ssl;
    server_name <YOURFQDN>;

    ssl_certificate         /etc/nginx/ssl/server.pem;
    ssl_certificate_key     /etc/nginx/ssl/server.pem;
    ssl_protocols           SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers             HIGH:!aNULL:!MD5;

    access_log /var/www/virtual/cpves/logs/nginx_access.log;
    error_log /var/www/virtual/cpves/logs/nginx_error.log;

    root /var/www/virtual/cpves/html/web;

    index index.php;

    location ~ ^(.*)\/\.(.*)$ {
        return 404;
    }

    location ~ ^(.*)\.php$ {
        try_files $uri =404;

        include       /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/var/www/virtual/cpves/sockets/phpfpm.socket;
    }
}


update xtc web config

update xtc web config

server {
  server_name mobile.viewspeaker.com mobile.viewspeaker.cat;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /admin/index.php;
  }

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

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

server {
  server_name mobile.api.viewspeaker.com mobile.api.viewspeaker.cat;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.php$ {
    try_files     $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}

server {
  server_name mobile.viewspeaker.com;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

  location / {
    try_files $uri $uri/ /admin/index.php;
  }

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

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

server {
  server_name mobile.api.viewspeaker.com;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

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

  location ~ \.php$ {
    try_files     $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
    fastcgi_pass  unix:/var/run/php5-fpm.sock;
  }
}


Enable GET parameters

Enable GET parameters

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

  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;
    # fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }
}

server {
  server_name default;
  root        /var/www/default;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

  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;
    # fastcgi_pass  unix:/var/run/hhvm/hhvm.sock;
  }
}


test with new default.vhost file

test with new default.vhost file

server {
	listen *:9000;

	root /var/www/html;
	server_name localhost;
	charset UTF-8;

    location / {
      root /var/www/html/;
        }
}

server {
	listen *:9000;

	root /var/www/html;
	server_name localhost;
	charset UTF-8;

		# Block Bad Bots
		include /etc/nginx/bots.d/blockbots.conf;
		include /etc/nginx/bots.d/ddos.conf;
}


remove restriction on CORS

remove restriction on CORS

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$ default;

        location /docs {
          root /var/www;
          add_header 'Access-Control-Allow-Origin' '*';
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}

server {
        listen   80;

        root /var/www/app;
        index index.html;

        server_name ~^apiparticulier(-dev|-test|-local|)\.sgmap\.fr$ default;

        location /docs {
          root /var/www;
          add_header 'Access-Control-Allow-Origin' '*.gouv.fr';
        }

        location /status {
          root /var/www;
        }

        location /api {

          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass http://app:3004;

        }

        location /tech {
          root /var/www;
        }

}


Modification config VHOST

Modification config VHOST

<VirtualHost *:80>
	ServerName galerie.local
	DocumentRoot /var/git/zf2biz/gallerie/public

	SetEnv APPLICATION_ENV "development"

	<Directory /var/git/zf2biz/galerie/public>
		Order deny,allow
		Allow from all

		AllowOverride None
	</Directory>

	RewriteEngine On
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s [OR]
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -l [OR]
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
	RewriteRule ^.*$ - [NC,L]
	RewriteRule ^.*$ /index.php [NC,L]
</VirtualHost>

<VirtualHost *:80>
	ServerName appblanche.local
	DocumentRoot /var/git/zf2biz/application-blanche/public

	SetEnv APPLICATION_ENV "development"

	<Directory /var/git/zf2biz/application-blanche/public>
		Order deny,allow
		Allow from all

		AllowOverride None
	</Directory>

	RewriteEngine On
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s [OR]
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -l [OR]
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
	RewriteRule ^.*$ - [NC,L]
	RewriteRule ^.*$ /index.php [NC,L]
</VirtualHost>


Add nginx configuration

Add nginx configuration

Signed-off-by: Konosprod <220f1eb1aca902f59b8c2b389e151298848b6ae6@free.fr>

server {
	server_name push.example.fr;
        root /var/www/push.example.fr;
        access_log /var/log/nginx/push.example.fr.access.log;
        error_log /var/log/nginx/push.example.fr.error.log;

        index index.php;

	location / {

		try_files $uri $uri/ /index.php?$args;
        }

	location ~ "^/([\w\d]{4})$" {
		try_files $uri /pages/decoder.php?decode=$1;
	}

        location ~ \.php$ {
                include fastcgi_params;
                fastcgi_intercept_errors on;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }

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

error: pathspec 'nginx.vhost' did not match any file(s) known to git


apache vhost config file

apache vhost config file

<VirtualHost *:80>
    WSGIScriptReloading On
    WSGIDaemonProcess %PROJECT%-%ENV%
    WSGIProcessGroup %PROJECT%-%ENV%
    WSGIApplicationGroup %PROJECT%-%ENV%
    WSGIPassAuthorization On

    WSGIScriptAlias / %ROOT%/%ENV%/%PROJECT%/config/%PROJECT%.wsgi

    ServerName %PROJECT%.%DOMAIN%

    <Location "/">
        Order Allow,Deny
        Allow from all
    </Location>

    <Location "/static">
        SetHandler None
    </Location>
    Alias /static %ROOT%/%ENV%/%PROJECT%/static

    <Location "/media">
        SetHandler None
    </Location>
    Alias /media %ROOT%/%ENV%/%PROJECT%/media

    ErrorLog /var/log/apache2/%PROJECT%_%ENV%_error.log
    LogLevel info
    CustomLog /var/log/apache2/%PROJECT%_%ENV%_access.log combined
</VirtualHost>

error: pathspec 'config/project_name.vhost' did not match any file(s) known to git


update nginx example conf

update nginx example conf

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pleebe/fuuka4plebs.git/'


add nginx sample config

add nginx sample config

server {
    server_name [domain];
    root  [symfony-web-root]

	location / {
		include proxy_params;
		proxy_set_header X-Forwarded-Host "$http_host:$server_port";
        proxy_pass  http://127.0.0.1:9100$request_uri;
    }

    error_log /var/log/nginx/syrma.log;
    access_log /var/log/nginx/syrma.log;
}

error: pathspec 'Resources/doc/sample/nginx.vhost' did not match any file(s) known to git


adding php-fpm support

adding php-fpm support

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ynk/vhs.git/'


Example configuration for Apache with LDAP authentication

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>

error: pathspec 'examples/apache2/default.vhost' did not match any file(s) known to git


add nginx vhost

add nginx vhost

server {
        root /path/to/vhost/public;
        index index.php index.html index.htm;
        server_name localhost;
        client_max_body_size 20M;
        location / {
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ .*.php$ {
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

}


Add example vhost file

Add example vhost file

<VirtualHost *:80>
        ServerName symfony.dev
        ServerAdmin webmaster@localhost
        DocumentRoot /var/vhosts/symfony/web
#        DirectoryIndex app.php
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/vhosts/symfony/>
                DirectoryIndex app.php
                AllowOverride All
                Order allow,deny
                Allow from all
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule ^(.*)$ app.php [QSA,L]
                RedirectMatch permanent ^/app\.php/(.*) /$1
                Options FollowSymLinks
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/symfony-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/symfony-access.log combined
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName symfony.dev
        ServerAdmin webmaster@localhost
        DocumentRoot /var/vhosts/symfony/web
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/vhosts/symfony/>
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/symfony-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/symfony-access.log combined

        SSLEngine on
        SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</IfModule>

error: pathspec 'symfony.vhost' did not match any file(s) known to git


Correct servername

Correct servername

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pluxain/dotfiles.git/'


nginx demo config

nginx demo config

closes #2

server {
  listen	 443 ssl;

  server_name YourServerName
  root /var/www/fslight/www/foodsharing-api/web;

  ssl_certificate PathToCrt.pem
  ssl_certificate_key PathToKey.pem

  location / {
# try to serve file directly, fallback to app.php
    try_files $uri /foodsharing-light$uri /app.php$is_args$args;
  }
# PROD
  location ~ ^/app\.php(/|$) {
    fastcgi_pass unix:/var/run/php5-fpm-fslight.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/app.php/some-path
# Remove the internal directive to allow URIs like this
    internal;
  }

  location ^~ /foodsharing/socket/ {
    include nodejs_proxy_params;
    access_log off;
    proxy_pass http://lmr_dev_nodejs/;
  }

  location = /fs/xhrapp.php {
    rewrite /fs(.*) $1 break;
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
      return 404;
    }
    fastcgi_pass lmr_prod_php;
    fastcgi_index index.php;
    include fastcgi_params;
    alias /var/www/lmr-prod/www;
  }

  location /fs/images/ {
    alias /var/www/lmr-prod/www/images/;
    try_files $uri =404;
  }

# return 404 for all other php files not matching the front controller
# this prevents access to other php files you don't want to be accessible.
  location ~ \.php$ {
    return 404;
  }

  error_log /var/www/fslight/log/nginx_error.log;
  access_log /var/www/fslight/log/nginx_access.log;
}

error: pathspec 'scripts/fslight.nginx.vhost' did not match any file(s) known to git


updated rewriting rules for apache

updated rewriting rules for apache

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rossjones/ScraperWikiX.git/'


allow access only from local networks

allow access only from local networks

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/morawskim/puppet-mopensuse.git/'


refine for xtc

refine for xtc

server {
  server_name mobile.api.viewspeaker.dog mobile.viewspeaker.dog;
  root        /var/www/xtc;
  index       index.php;

  client_max_body_size 100M;
  fastcgi_read_timeout 1800;

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

  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;
  }
}

error: pathspec 'images/nginx/xtc.vhost' did not match any file(s) known to git


N°commit: d9c2d13

N°commit: d9c2d13

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/debruyne0/application-blanche.git/'


add apache vhost

add apache vhost

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        ServerName localhost

        DocumentRoot /path/to/vhost/public/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /path/to/vhost/public/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

error: pathspec 'apache.vhost' did not match any file(s) known to git


Add vhost for local luxain.pro under WP

Add vhost for local luxain.pro under WP


add support directory and nginx example vhost

fatal: unable to access 'https://github.com/hggh/cpves.git/': The requested URL returned error: 403


add apache vhost to data folder

add apache vhost to data folder

useful for fresh installation

error: pathspec 'data/apache.vhost' did not match any file(s) known to git


Update default.vhost (#45)

Update default.vhost (#45)

fatal: unable to access 'https://github.com/kasperisager/phpstack.git/': The requested URL returned error: 403