I’m using Virtualmin on local machine installed with --bundle LEMP option.
I installed few WordPress installations in Default account (to access using IP address)
When I enable permalinks the pages are no more accessible.
I’ve followed the instructions in this topic:
Hi Guys
Im new here and new to Virtualmin, i have had a play about with it and put a wordpress site onto it.
I have tried so many times, searched the internet to find a solution to the Nginx rewrite issue.
I have added somethings into the conf file within webadmin but nothing seems to work.
Each time i change my permalinks in wp to look better it doesnt work.
Any help would be great.
Thanks
and added the following code to webmin —> servers -->nginx server → edit configuration files:
location / { try_files $uri $uri/ /index.php?$args; }
It seems does not work with WordPress subfolder installs, any idea how to properly configure it?
SYSTEM INFORMATION
OS type and version
CentOS 7
Virtualmin version
7.2
Nginx version
1.20.1
Have you restarted Nginx after adding the above line? And could you post the content of your /etc/nginx/sites-available/example.com.conf
where example.com
is the domain name of the WordPress site.
There are no /etc/nginx/sites-available/*.conf files listed even when if I created them manually. I did restart Nginx server from Webmin. The only conf file listed is /etc/nginx/nginx.conf:
server_names_hash_bucket_size 128;
server {
server_name default.example.com www.default.example.com;
listen 10.87.143.2 default_server;
root /home/default/public_html;
index index.php index.htm index.html;
access_log /var/log/virtualmin/default.example.com_access_log;
error_log /var/log/virtualmin/default.example.com_error_log;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME "/home/default/public_html$fastcgi_script_name";
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /home/default/public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS $https;
location ^~ /.well-known/ {
try_files $uri /;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ "\.php(/|$)" {
try_files $uri $fastcgi_script_name =404;
default_type application/x-httpd-php;
fastcgi_pass unix:/var/php-nginx/166464878868630.sock/socket;
}
fastcgi_split_path_info "^(.+\.php)(/.+)$";
location /cgi-bin/ {
gzip off;
root /home/default/cgi-bin;
fastcgi_pass unix:/var/fcgiwrap/166464878868630.sock/socket;
fastcgi_param SCRIPT_FILENAME "/home/default$fastcgi_script_name";
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /home/default/public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS $https;
}
listen 10.87.143.2:443 ssl default_server;
ssl_certificate /etc/ssl/virtualmin/166464878868630/ssl.cert;
ssl_certificate_key /etc/ssl/virtualmin/166464878868630/ssl.key;
fastcgi_read_timeout 60;
}
system
Closed
December 21, 2022, 12:36pm
4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.