Keith
Forum Replies Created
-
Hello @codexonics , thank you for the detailed explanation. It was my side error. I was new to Nginx, and got mixed up with a lot of basic server configuration, and one of which was the cause of this freeze.
Now that I have finished testing, I have other questions, but I think it is better to create another ticket.
- This reply was modified 2 years, 9 months ago by Keith.
Forum: Installing WordPress
In reply to: Trouble with NginX setting for multi-site’s multi-domain mappingI fixed the problem finally. For 80, just dump all domain aliass for server name, but the root is always the superadmin domain. For 443, I have to create server blocks for each ssl cert. Since detailed settings are common and it looks ‘ugly’ if added to every server block, I created a side .conf for setting, and loaded it by ‘include /myfolder/mysetting.conf’. As long as the file is not in the listener folders (conf.d, site-enabled), Nginx does not reference it.
Migrating from Apache to Nginx, I get to see why server setting is so complicated and why .htaccess is popular choice. But I can feel distinctive performance improvement from Apache to Nginx. Just want to learn more about detailed settings for better optimization so that I can best use of Nginx.
Forum: Installing WordPress
In reply to: Trouble with NginX setting for multi-site’s multi-domain mappingserver { listen 80; listen [::]:80; root /var/www/class.giai.org; index index.php index.html index.htm; server_name 1.maindomain.com 2.maindomain.com newdomain.com; error_log /var/log/nginx/1.maindomain.com_error.log; access_log /var/log/nginx/1.maindomain.com_access.log; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } server { listen 443 ssl http2; error_log /var/log/nginx/2.maindomain.com_error.log; access_log /var/log/nginx/2.maindomain.com_access.log; root /var/www/2.maindomain.com; #(Not sure if I should uncomment this line, as there is no 2.main.com folder in /var/www) server_name 2.maindomain.com; ssl_certificate /etc/letsencrypt/live/2.maindomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/2.maindomain.com/privkey.pem; } server { listen 443 ssl http2; root /var/www/1.maindomain.com; error_log /var/log/nginx/1.maindomain.com_error.log; access_log /var/log/nginx/1.maindomain.com_access.log; server_name 1.maindomain.com; ssl_certificate /etc/letsencrypt/live/1.maindomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/1.maindomain.com/privkey.pem;Above code is my sample for current server blocks. For the (sub)domains that are defined in 80’s server_name, all are properly mapped. At least I can access them without ‘http”s”‘. For the ones that I have not defined in 80 port’s server block, it is not accessible, as expected.
I think the problem lies in server blocks related to 443. Websites are loaded when I call “http://xxx.com “, but with “https://~ “, it gives me 404. (added space before ending ” due to rendering issue)
I tried to define 443 port’s server name and ssl cert mapping individually for each domain, which seems working because even if I have 404 for 2.maindomain.com. I do have ssl cert on, while newdomain.com without 443 port’s server block has no ssl cert recognized by browsers.
What still puzzles me is where to put in additional settings and what has to be added.
Forum: Installing WordPress
In reply to: Trouble with NginX setting for multi-site’s multi-domain mappingThank you for the answer @grafmax !
Then, a few other follow up questions.
- Will there be more than 1 root path for multisite? Say, WordPress is installed to /var/www/abc, and the 2nd site within multisite network is bbc.com, then, should I create /var/www/bbc and define that path as root for bbc.com? If this is indeed right approach, should there be separate .conf file? or am I supposed to aggregate all of them to main domain’s .conf?
- In the /var/www/bbc, there will be no file initially. How does the initial set up work? Unlike single sites, I assume I don’t have to install WordPress for each, then shouldn’t there be any admin panel within WordPress multisite superdomain where the child domains are running? Is the root definition within Nginx .conf enough?
- Assuming that all child domains are going to have each .conf, guess each ssl cert should be defined within each one’s .conf?
- This reply was modified 2 years, 9 months ago by Keith.
Forum: Installing WordPress
In reply to: Trouble with NginX setting for multi-site’s multi-domain mappingExcept the blog No1., all other webpages show NginX server page if it is defined in config, and empty page if not defined.
I must have done something wrong
Forum: Developing with WordPress
In reply to: MySQL/MariaDB on 2nd disk boosts performance?@sterndata Thanks for the sharp feedback. I will have a DB server then.
Forum: Developing with WordPress
In reply to: MySQL/MariaDB on 2nd disk boosts performance?I have stumbled on this one, and it seems that I should have another server for better security, in addition to performance issue that I’ve raised above. Not sure what are optimal hardware specs for each server, web / DB, but this is something I feel that I can find good information from googling.
Forum: Plugins
In reply to: [Simple Local Avatars] WP Offload Media compatibility issueI also have the same issue