- Go to Settings -> General
- Change Wordpress URL and Site URL to https://domain.ir/blog
- Create the
liara_nginx.confin a static app with the following content and deploy it. - Update
wp-config.php.
You're good to go.
liara_nginx.conf in a static app with the following content and deploy it.wp-config.php.You're good to go.
| resolver 127.0.0.11 ipv6=off valid=5s; | |
| location / { | |
| index index.html index.htm; | |
| } | |
| location ~/blog(.*)$ { | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Forwarded-For $remote_addr; | |
| proxy_set_header X-Forwarded-Proto https; | |
| set $wpblog app-id:80; | |
| proxy_pass http://$wpblog$1; | |
| } |
| <?php | |
| // Put the following 2 lines to the wp-config.php file before the "That's all, stop editing! Happy publishing." comment | |
| $_SERVER['REQUEST_URI'] = str_replace("/wp-admin", "/blog/wp-admin", $_SERVER['REQUEST_URI']); | |
| define( 'CONCATENATE_SCRIPTS', false ); |