A friend of mine would like to port their Wordpress site onto my server where I run my Grav website, so that they can exploit all the features of Wordpress without paying for their own server. I’m curious to try, but I’m worried that it would be much more complicated than I anticipated.
Since I’ve had a lot of help on this forum before, I thought I’d ask if anyone has any advice, thoughts or tips on the subject, even if it’s not strictly Grav related
More details:
- My website
- Grav installed from zip, with a grav user
- I’m using Nginx with letsencrypt
- My Nginx conf file, in
/etc/nginx/sites-available/grav
:
server {
index index.html index.php;
## Begin - Server Info
root /home/grav/www/html;
server_name gobs.eu www.gobs.eu gobs.brussels www.gobs.brussels;
## End - Server Info
## Begin - Index # for subfolders, simply adjust the rewrite: # to use `/subfolder/index.php`
location / {
try_files $uri $uri/ /index.php?_url=$uri;
}
## End - Index
## Begin - PHP
location ~ \.php$ {
# Choose either a socket or TCP/IP address
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
## End - PHP
## Begin - Security
# deny all direct access for these folders
location ~* /(.git|cache|bin|logs|backups)/.*$ {
return 403;
}
# deny running scripts inside core system folders
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ {
return 403;
}
# deny running scripts inside user folder
location ~* /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ {
return 403;
}
# deny access to specific files in the root folder
location ~ /(LICENSE|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) {
return 403;
}
## End - Security
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.gobs.brussels/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.gobs.brussels/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.gobs.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = gobs.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = gobs.brussels) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = www.gobs.brussels) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name gobs.eu www.gobs.eu gobs.brussels www.gobs.brussels;
return 404; # managed by Certbot
}