Page 1 of 2

Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 1:50 am
by seeuhome
Hi,

I just moved a Wordpress site from Centos7 (VestaCP) to Debian 10 (myVesta). Previously the hosting was on Apache, now is on Nginx. I have a problem that now Wordpress pretty links (post-name) are not working and I think the problem comes from the fact that mod)rewrite is not enabled.

Any pro tips would be very helpful.

Thank you,
Greg

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 10:02 am
by myVesta
check do you have .htaccess file.

if you installed myVesta with default options, mod_rewrite is enabled for sure.

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 3:53 pm
by seeuhome
I just did a clean wordpress install on a test domain that I own. There is no .htaccess file.

As soon as I change the permalinks setting to Post Name I got 404's on the site.

Also, reading on-line nginx doesn't support .htaccess files.

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 4:02 pm
by myVesta
can you copy here first 5 lines of /usr/local/vesta/conf/vesta.conf ?
first we need to know did you intall apache at all :)

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 4:35 pm
by seeuhome
WEB_SYSTEM= 'nginx'
WEB_PORT= '80'
WEB_SSL_PORT= '443'
WEB_SSL= 'openssl'
WEB_BACKEND= 'php-fpm'

This is the script I ran on a clean Debian v10

bash vst-install-debian.sh --nginx yes --phpfpm yes --apache no --named no --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim no --dovecot no --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no --hostname server.domain.com --email [email protected] --password xxxxxxxxxx

Should have I selected apache yes on the installer?

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 4:43 pm
by myVesta
Go to WEB -> Edit domain -> Template
try to put wordpress2_rewrite nginx template

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 5:07 pm
by seeuhome
Which one should I pick? Wordpress, Wordpress2 or Wordpress2_rewrite

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 5:29 pm
by seeuhome
Thank you for helping me with this issue!!!

The "wordpress" selection didn't work. But the wordpress2 and the wordpress_rewrite options did fix my issue. I've never needed
to look at these options before so it's super nice to see all these.

Thank you again!

Re: Wordpress running on Debian Help

Posted: Tue Jul 14, 2020 7:41 pm
by myVesta
Yes, because you chose nginx+fpm (without apache), it is mandatory to choose template regarding your CMS.
It is not needed in default install (nginx+apache+fpm), that stack is also very optimized, because apache works in mpm_event mode... plus you can install then multi-php versions..

Re: Wordpress running on Debian Help

Posted: Fri Jul 17, 2020 10:07 am
by Ominae
dpeca wrote: Tue Jul 14, 2020 7:41 pm Yes, because you chose nginx+fpm (without apache), it is mandatory to choose template regarding your CMS.
It is not needed in default install (nginx+apache+fpm), that stack is also very optimized, because apache works in mpm_event mode... plus you can install then multi-php versions..
I had the same 404 problem with a clean installation of nginx and php-fpm, after hours I fixed it select wordpress2.

What differences does wordpress2 vs wordpress2_rewrite have?