diff --git a/docs/getting-started/other-webservers.md b/docs/setup/other-webservers.md similarity index 95% rename from docs/getting-started/other-webservers.md rename to docs/setup/other-webservers.md index 8af798e..1d9be22 100644 --- a/docs/getting-started/other-webservers.md +++ b/docs/setup/other-webservers.md @@ -1,145 +1,145 @@ -# Other webservers - -## NGINX - -**This is just an example, we assume that you have prior experience setting up NGINX Vhosts!** - -
- -[For further instructions, please refer to the official NGINX documentation provided by Laravel.](https://laravel.com/docs/9.x/deployment#nginx) - -
- -**To ensure proper security, access to certain configuration files must be prevented.** - -Example configuration: - -``` -server { - listen 80; - listen [::]:80; - server_name example.com; - root /path/to/example.com; - - add_header X-Frame-Options "SAMEORIGIN"; - add_header X-Content-Type-Options "nosniff"; - - index index.php; - - charset utf-8; - - location / { - try_files $uri $uri/ /index.php?$query_string; - } - - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } - - error_page 404 /index.php; - - location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; - fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; - include fastcgi_params; - } - - location ~ /\.(?!well-known).* { - deny all; - } - - -location ~ ^\. { -deny all; -} - -location ~ \.sqlite$ { -deny all; -} - -location ~ \.env$ { -deny all; -} - -location ~ /\.htaccess { -allow all; -} - -} -``` - -## Apache2 - -**This is just an example, we assume that you have prior experience setting up Apache Vhosts!** - -**Access to configuration files is already denied via `.htaccess` files in the LinkStack root directory.** - -
- -```xml - - ServerName example.com - ServerAlias www.example.com - ServerAdmin webmaster@localhost - DocumentRoot /path/to/example.com - DirectoryIndex index.htm index.html index.php - ErrorLog /var/log/httpd/linkstack/error.log - CustomLog /var/log/httpd/linkstack/access.log combined - - - Options FollowSymLinks - AllowOverride None - - - - Options -Indexes +MultiViews +FollowSymLinks +ExecCGI - Require all granted - AllowOverride all - - -``` -## Litespeed - -**This is just an .htaccess example, we assume that you have prior experience setting up Litespeed - Cyberpanel!** - -``` - - - Options -MultiViews - - - RewriteEngine On - - # Redirect Trailing Slashes If Not A Folder... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)/$ /$1 [L,R=301] - - # Handle Front Controller... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - - # Handle Authorization Header - RewriteCond %{HTTP:Authorization} . - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - - -# Restrict access to critical files - -Order allow,deny -Deny from all - - - Order allow,deny - Deny from all - - - Order allow,deny - Deny from all - -``` - -## More webservers - -Currently, no documentation is provided for other web server solutions. - -Please refer to the Laravel documentation regarding the setup process for your specific web server solution. +# Other webservers + +## NGINX + +**This is just an example, we assume that you have prior experience setting up NGINX Vhosts!** + +
+ +[For further instructions, please refer to the official NGINX documentation provided by Laravel.](https://laravel.com/docs/9.x/deployment#nginx) + +
+ +**To ensure proper security, access to certain configuration files must be prevented.** + +Example configuration: + +``` +server { + listen 80; + listen [::]:80; + server_name example.com; + root /path/to/example.com; + + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + + index index.php; + + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + error_page 404 /index.php; + + location ~ \.php$ { + fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.(?!well-known).* { + deny all; + } + + +location ~ ^\. { +deny all; +} + +location ~ \.sqlite$ { +deny all; +} + +location ~ \.env$ { +deny all; +} + +location ~ /\.htaccess { +allow all; +} + +} +``` + +## Apache2 + +**This is just an example, we assume that you have prior experience setting up Apache Vhosts!** + +**Access to configuration files is already denied via `.htaccess` files in the LinkStack root directory.** + +
+ +```xml + + ServerName example.com + ServerAlias www.example.com + ServerAdmin webmaster@localhost + DocumentRoot /path/to/example.com + DirectoryIndex index.htm index.html index.php + ErrorLog /var/log/httpd/linkstack/error.log + CustomLog /var/log/httpd/linkstack/access.log combined + + + Options FollowSymLinks + AllowOverride None + + + + Options -Indexes +MultiViews +FollowSymLinks +ExecCGI + Require all granted + AllowOverride all + + +``` +## Litespeed + +**This is just an .htaccess example, we assume that you have prior experience setting up Litespeed - Cyberpanel!** + +``` + + + Options -MultiViews + + + RewriteEngine On + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)/$ /$1 [L,R=301] + + # Handle Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + +# Restrict access to critical files + +Order allow,deny +Deny from all + + + Order allow,deny + Deny from all + + + Order allow,deny + Deny from all + +``` + +## More webservers + +Currently, no documentation is provided for other web server solutions. + +Please refer to the Laravel documentation regarding the setup process for your specific web server solution. diff --git a/mkdocs.yml b/mkdocs.yml index f2bd1bf..11aa088 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -110,7 +110,7 @@ nav: - Setup: setup/setup.md - Docker Setup: docker/setup.md - Reverse Proxies: docker/reverse-proxies.md - - Other webservers: getting-started/other-webservers.md + - Other webservers: setup/other-webservers.md # - Disable registration: setup/disable-registration.md - Configuration: