{"_id":"54d6ad1811e31f0d001b8903","user":"54c9b68d7a11f60d0022aa25","version":{"_id":"54c670dbf2ab9319008e8153","forked_from":"54c66cdf2b94bb19003d3427","project":"54c66cdf2b94bb19003d3424","__v":3,"createdAt":"2015-01-26T16:52:43.765Z","releaseDate":"2015-01-26T16:52:43.765Z","categories":["54c670dcf2ab9319008e8154","54c6779d2b94bb19003d345e","54c67bfe2b94bb19003d3466"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.7.0","version":"0.7"},"__v":7,"category":{"_id":"54c670dcf2ab9319008e8154","pages":["54c670dcf2ab9319008e8155","54c672d7f2ab9319008e8164","54c67409f2ab9319008e816e","54c6771cf0320f0d00ac9be2","54c677412b94bb19003d345b","54c98fd569c3390d00033a26","54c9900d69c3390d00033a28","54c9904c7a11f60d0022a9cb","54d6ad1811e31f0d001b8903","551460b7e74c1c2300f9b387"],"project":"54c66cdf2b94bb19003d3424","version":"54c670dbf2ab9319008e8153","__v":10,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-26T16:35:44.174Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"project":"54c66cdf2b94bb19003d3424","updates":["54fdfb9e4759dc21005936a1","577b84e5ee2933170067a425","58e2bafa892b242f001fceef"],"next":{"pages":[],"description":""},"createdAt":"2015-02-08T00:26:00.876Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Nginx\"\n}\n[/block]\nSolder vhost config\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"server {\\n    listen 80; #IPv4\\n    listen [::]:80; #IPv6\\n\\n    # Host that will serve this project.\\n    server_name     solder.technicpack.net;\\n\\n    # Useful logs for debugging.\\n    access_log      /var/log/nginx/solder.technicpack.net/access.log;\\n    error_log       /var/log/nginx/solder.technicpack.net/error.log;\\n    rewrite_log     on;\\n\\n    # The location of our projects public directory.\\n    root            /var/www/solder.technicpack.net/htdocs/TechnicSolder/public;\\n    index index.php;\\n\\n    location / {\\n        # URLs to attempt, including pretty ones\\n        try_files   $uri $uri/ /index.php?$query_string;\\n    }\\n\\n    # PHP FPM configuration.\\n    location ~* \\\\.php$ {\\n            fastcgi_pass                    unix:/var/run/php5-fpm.sock;\\n            fastcgi_index                   index.php;\\n            fastcgi_split_path_info         ^(.+\\\\.php)(.*)$;\\n            include                         fastcgi_params;\\n            fastcgi_param PATH_INFO         $fastcgi_path_info;\\n            fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;\\n    }\\n\\n    # We don't need .ht files with nginx.\\n    location ~ /\\\\.ht {\\n            deny all;\\n    }\\n\\n    # Hide dot files/folders\\n    location ~ .*/\\\\. {\\n            return 403;\\n    }\\n    \\n    # Set header expirations on per-project basis\\n    location ~* \\\\.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {\\n            expires 365d;\\n\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Nginx solder vhost config\"\n    }\n  ]\n}\n[/block]\nRepo vhost config\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"server {\\n    listen 80; #IPv4\\n    listen [::]:80; #IPv6\\n\\n    # Host that will serve this project.\\n    server_name     repo.technicpack.net;\\n\\n    # Useful logs for debug.\\n    access_log      /var/log/nginx/repo.technicpack.net/access.log;\\n    error_log       /var/log/nginx/repo.technicpack.net/error.log;\\n    rewrite_log     on;\\n\\n    # The location of repo directory.\\n    root            /var/www/repo.technicpack.net/htdocs/Technic/;\\n    index index.php index.html index.htm;\\n\\n    location / {\\n        # URLs to attempt, including pretty ones.\\n\\t\\t\\t\\ttry_files $uri $uri/ /index.html;\\n\\t\\t\\t\\tautoindex on;\\n        autoindex_exact_size off;\\n        autoindex_localtime on;\\n    }\\n\\t\\n    # We don't need .ht files with nginx.\\n    location ~ /\\\\.ht {\\n            deny all;\\n    }\\n\\n    # Hide dot files/folders\\n    location ~ .*/\\\\. {\\n           return 403;\\n    }\\n\\n    # Set header expirations on per-project basis\\n    location ~* \\\\.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {\\n            expires 365d;\\n\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Nginx repo vhost config\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Apache\"\n}\n[/block]\nSolder vhost config\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<VirtualHost *:80>\\n \\n \\t\\t\\t\\t# Host that will serve this project.\\n        ServerName solder.technicpack.net\\n        ServerAdmin you:::at:::youremail.com\\n        \\n        # The location of public directory.\\n        DocumentRoot /var/www/html/solder/public/\\n \\n \\t\\t\\t\\t# Important options for solder public directory.\\n        <Directory /var/www/html/solder/public>\\n              Options FollowSymLinks\\n              AllowOverride All\\n              \\n              # requires mod_version\\n              <IfVersion >= 2.4>\\n                    Require all granted\\n              </IfVersion>\\n              <IfVersion < 2.4>\\n                    Order allow,deny\\n                    Allow from all\\n              </IfVersion>\\n        </Directory>\\n \\n \\t\\t\\t\\t# Useful logs for debug.\\n        ErrorLog ${APACHE_LOG_DIR}/solder/error.log\\n        CustomLog ${APACHE_LOG_DIR}/solder/access.log combined\\n \\n</VirtualHost>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"If the site is inaccessible\",\n  \"body\": \"Do not modify DocumentRoot to append /index.php but read \\\"Rewrite Engine on Apache\\\" section below.\"\n}\n[/block]\nRepo vhost config\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<VirtualHost *:80>\\n         \\n        # Host that will serve this project.\\n        ServerName repo.technicpack.net\\n        ServerAdmin you@youremail.com\\n        \\n        # The location of repo directory.\\n        DocumentRoot /var/www/html/repo/\\n \\n \\t\\t\\t\\t# Important options for solder repo directory.\\n        <Directory /var/www/html/repo>\\n              Options +Indexes +FollowSymLinks\\n              AllowOverride All\\n\\n              # requires mod_version\\n              <IfVersion >= 2.4>\\n                    Require all granted\\n              </IfVersion>\\n              <IfVersion < 2.4>\\n                    Order allow,deny\\n                    Allow from all\\n              </IfVersion>\\n        </Directory>\\n \\n \\t\\t\\t\\t# Useful logs for debug.\\n        ErrorLog ${APACHE_LOG_DIR}/solderrepo/error.log\\n        CustomLog ${APACHE_LOG_DIR}/solderrepo/access.log combined\\n \\n</VirtualHost>\",\n      \"language\": \"text\",\n      \"name\": \"Repo vhost config\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Rewrite Engine on Apache\",\n  \"type\": \"basic\"\n}\n[/block]\nIf you don't have Rewrite Engine on your Apache web server, you need to use a URL with index.php after the domain name.\n\nIf you want a clean URL, install Rewrite Engine on your Apache web server and use the configuration provided above so your server uses the .htaccess file correctly and enable Rewrite Engine for your Solder, so you can access to your solder without index.php.","excerpt":"Here are a few example configs for the Apache and Nginx web servers, these are just examples and are not recommended for all use cases","slug":"example-web-server-configs","type":"basic","title":"Example Web Server configs"}

Example Web Server configs

Here are a few example configs for the Apache and Nginx web servers, these are just examples and are not recommended for all use cases

[block:api-header] { "type": "basic", "title": "Nginx" } [/block] Solder vhost config [block:code] { "codes": [ { "code": "server {\n listen 80; #IPv4\n listen [::]:80; #IPv6\n\n # Host that will serve this project.\n server_name solder.technicpack.net;\n\n # Useful logs for debugging.\n access_log /var/log/nginx/solder.technicpack.net/access.log;\n error_log /var/log/nginx/solder.technicpack.net/error.log;\n rewrite_log on;\n\n # The location of our projects public directory.\n root /var/www/solder.technicpack.net/htdocs/TechnicSolder/public;\n index index.php;\n\n location / {\n # URLs to attempt, including pretty ones\n try_files $uri $uri/ /index.php?$query_string;\n }\n\n # PHP FPM configuration.\n location ~* \\.php$ {\n fastcgi_pass unix:/var/run/php5-fpm.sock;\n fastcgi_index index.php;\n fastcgi_split_path_info ^(.+\\.php)(.*)$;\n include fastcgi_params;\n fastcgi_param PATH_INFO $fastcgi_path_info;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n }\n\n # We don't need .ht files with nginx.\n location ~ /\\.ht {\n deny all;\n }\n\n # Hide dot files/folders\n location ~ .*/\\. {\n return 403;\n }\n \n # Set header expirations on per-project basis\n location ~* \\.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {\n expires 365d;\n\n }\n}", "language": "json", "name": "Nginx solder vhost config" } ] } [/block] Repo vhost config [block:code] { "codes": [ { "code": "server {\n listen 80; #IPv4\n listen [::]:80; #IPv6\n\n # Host that will serve this project.\n server_name repo.technicpack.net;\n\n # Useful logs for debug.\n access_log /var/log/nginx/repo.technicpack.net/access.log;\n error_log /var/log/nginx/repo.technicpack.net/error.log;\n rewrite_log on;\n\n # The location of repo directory.\n root /var/www/repo.technicpack.net/htdocs/Technic/;\n index index.php index.html index.htm;\n\n location / {\n # URLs to attempt, including pretty ones.\n\t\t\t\ttry_files $uri $uri/ /index.html;\n\t\t\t\tautoindex on;\n autoindex_exact_size off;\n autoindex_localtime on;\n }\n\t\n # We don't need .ht files with nginx.\n location ~ /\\.ht {\n deny all;\n }\n\n # Hide dot files/folders\n location ~ .*/\\. {\n return 403;\n }\n\n # Set header expirations on per-project basis\n location ~* \\.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {\n expires 365d;\n\n }\n}", "language": "json", "name": "Nginx repo vhost config" } ] } [/block] [block:api-header] { "type": "basic", "title": "Apache" } [/block] Solder vhost config [block:code] { "codes": [ { "code": "<VirtualHost *:80>\n \n \t\t\t\t# Host that will serve this project.\n ServerName solder.technicpack.net\n ServerAdmin you@youremail.com\n \n # The location of public directory.\n DocumentRoot /var/www/html/solder/public/\n \n \t\t\t\t# Important options for solder public directory.\n <Directory /var/www/html/solder/public>\n Options FollowSymLinks\n AllowOverride All\n \n # requires mod_version\n <IfVersion >= 2.4>\n Require all granted\n </IfVersion>\n <IfVersion < 2.4>\n Order allow,deny\n Allow from all\n </IfVersion>\n </Directory>\n \n \t\t\t\t# Useful logs for debug.\n ErrorLog ${APACHE_LOG_DIR}/solder/error.log\n CustomLog ${APACHE_LOG_DIR}/solder/access.log combined\n \n</VirtualHost>", "language": "text" } ] } [/block] [block:callout] { "type": "warning", "title": "If the site is inaccessible", "body": "Do not modify DocumentRoot to append /index.php but read \"Rewrite Engine on Apache\" section below." } [/block] Repo vhost config [block:code] { "codes": [ { "code": "<VirtualHost *:80>\n \n # Host that will serve this project.\n ServerName repo.technicpack.net\n ServerAdmin you@youremail.com\n \n # The location of repo directory.\n DocumentRoot /var/www/html/repo/\n \n \t\t\t\t# Important options for solder repo directory.\n <Directory /var/www/html/repo>\n Options +Indexes +FollowSymLinks\n AllowOverride All\n\n # requires mod_version\n <IfVersion >= 2.4>\n Require all granted\n </IfVersion>\n <IfVersion < 2.4>\n Order allow,deny\n Allow from all\n </IfVersion>\n </Directory>\n \n \t\t\t\t# Useful logs for debug.\n ErrorLog ${APACHE_LOG_DIR}/solderrepo/error.log\n CustomLog ${APACHE_LOG_DIR}/solderrepo/access.log combined\n \n</VirtualHost>", "language": "text", "name": "Repo vhost config" } ] } [/block] [block:api-header] { "title": "Rewrite Engine on Apache", "type": "basic" } [/block] If you don't have Rewrite Engine on your Apache web server, you need to use a URL with index.php after the domain name. If you want a clean URL, install Rewrite Engine on your Apache web server and use the configuration provided above so your server uses the .htaccess file correctly and enable Rewrite Engine for your Solder, so you can access to your solder without index.php.