Wordpress running on Debian Help

seeuhome
Posts: 6
Joined: Mon Jul 13, 2020 4:36 am

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
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

check do you have .htaccess file.

if you installed myVesta with default options, mod_rewrite is enabled for sure.
seeuhome
Posts: 6
Joined: Mon Jul 13, 2020 4:36 am

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.
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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 :)
seeuhome
Posts: 6
Joined: Mon Jul 13, 2020 4:36 am

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?
Last edited by seeuhome on Tue Jul 14, 2020 4:47 pm, edited 1 time in total.
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

Go to WEB -> Edit domain -> Template
try to put wordpress2_rewrite nginx template
seeuhome
Posts: 6
Joined: Mon Jul 13, 2020 4:36 am

Which one should I pick? Wordpress, Wordpress2 or Wordpress2_rewrite
seeuhome
Posts: 6
Joined: Mon Jul 13, 2020 4:36 am

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!
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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..
Ominae
Posts: 21
Joined: Fri Jul 10, 2020 4:30 am

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?
Post Reply