servers:nginx:lychee
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:nginx:lychee [2023/06/27 07:50] – Sean Rhone | servers:nginx:lychee [2023/06/27 12:48] (current) – Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Information ====== | ====== Information ====== | ||
- | * WordPress | + | * Lychee |
* [[Information: | * [[Information: | ||
- | * https://blog.realmofespionage.xyz | + | * https://media.realmofespionage.xyz |
===== Prerequisites ===== | ===== Prerequisites ===== | ||
Line 14: | Line 14: | ||
===== Notes ===== | ===== Notes ===== | ||
- | * :!: Do not initiate any updates from the Admin/ | + | * :!: Somewhat WIP still |
- | * TODO: https:// | + | |
====== Dependencies ====== | ====== Dependencies ====== | ||
Line 27: | Line 26: | ||
**** | **** | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
====== PHP Dependencies ====== | ====== PHP Dependencies ====== | ||
Line 39: | Line 38: | ||
sudo mysql | sudo mysql | ||
- | CREATE DATABASE | + | CREATE DATABASE |
- | GRANT ALL PRIVILEGES ON wordpress.* to 'wordpress' | + | GRANT ALL PRIVILEGES ON lychee.* to 'lychee' |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
EXIT | EXIT | ||
+ | |||
+ | ====== Lychee Config ====== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | sudo -u ' | ||
+ | |||
+ | < | ||
+ | DB_CONNECTION=" | ||
+ | DB_DATABASE=" | ||
+ | DB_USERNAME=" | ||
+ | DB_PASSWORD=x | ||
+ | DB_SOCKET="/ | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 51: | Line 63: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
- | [blog] | + | [media] |
; User/Group | ; User/Group | ||
Line 61: | Line 73: | ||
; Socket | ; Socket | ||
- | listen = / | + | listen = / |
listen.acl_users = nginx | listen.acl_users = nginx | ||
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
Line 79: | Line 91: | ||
php_value[memory_limit] = " | php_value[memory_limit] = " | ||
php_value[post_max_size] = " | php_value[post_max_size] = " | ||
- | php_value[upload_max_filesize] = "10M" | + | php_value[upload_max_filesize] = "100M" |
php_value[max_file_uploads] = " | php_value[max_file_uploads] = " | ||
Line 89: | Line 101: | ||
===== FastCGI ===== | ===== FastCGI ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
# PHP-FPM | # PHP-FPM | ||
- | location | + | location |
- | fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$; | + | fastcgi_split_path_info ^(.+?\.php)(/ |
+ | |||
+ | fastcgi_param PHP_VALUE " | ||
+ | max_execution_time=200 | ||
+ | upload_max_filesize=100M | ||
+ | memory_limit=512M" | ||
fastcgi_intercept_errors on; | fastcgi_intercept_errors on; | ||
+ | fastcgi_param HTTP_PROXY ""; | ||
fastcgi_index index.php; | fastcgi_index index.php; | ||
include fastcgi_params; | include fastcgi_params; | ||
- | fastcgi_param SCRIPT_FILENAME | + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
+ | fastcgi_param PATH / | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
- | fastcgi_pass unix:/ | + | fastcgi_pass unix:/ |
}</ | }</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | * :!: '' | + | * https:// |
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
server { | server { | ||
listen ' | listen ' | ||
- | server_name 'blog.realmofespionage.xyz'; | + | server_name 'media.realmofespionage.xyz'; |
- | root '/ | + | root '/ |
index ' | index ' | ||
- | include '/ | + | include '/ |
include '/ | include '/ | ||
- | client_max_body_size '10M'; | + | client_max_body_size '100M'; |
add_header Content-Security-Policy " | add_header Content-Security-Policy " | ||
Line 127: | Line 146: | ||
# error_log | # error_log | ||
- | | + | |
- | | + | |
+ | | ||
+ | break; | ||
} | } | ||
- | | + | location ~ [^/]\.php(/|$) { |
- | + | | |
- | | + | |
- | | + | |
} | } | ||
+ | |||
+ | rewrite ^/(.+)/$ /$1 permanent; | ||
}</ | }</ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
- | * https://blog.realmofespionage.xyz | + | * https://media.realmofespionage.xyz |
====== Settings ====== | ====== Settings ====== | ||
Line 159: | Line 180: | ||
Group=nginx | Group=nginx | ||
Type=oneshot | Type=oneshot | ||
+ | WorkingDirectory=/ | ||
+ | Environment=" | ||
+ | ExecStartPre='/ | ||
ExecStart='/ | ExecStart='/ | ||
+ | ExecStart='/ | ||
+ | ExecStart='/ | ||
+ | ExecStartPost='/ | ||
+ | ExecStartPost='/ | ||
ExecStartPost='/ | ExecStartPost='/ | ||
Line 368: | Line 396: | ||
**** | **** | ||
- | cd '/ | + | cd '/ |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== |
/var/www/wiki/data/attic/servers/nginx/lychee.1687866619.txt.gz · Last modified: 2023/06/27 07:50 by Sean Rhone