Hi all, New to ISPConfig, I have swapped over from CWP, I have set everything up and put my website back online and I have hit a couple of problems, I have installed ISPConfig with nginx using the auto installer, the website runs wordpress, heavy load as its pulls news feeds etc for a radio station, website went on fine but half of the plugin are not working as they should. It got me thinking why is this.....it then clicked that on CWP I was running Nginx, Apache & Varnish. I guess this is the issue, so my question is...can I install Apache alongside Nginx? Sorry for the long post.
Sure you can. As long as Apache runs on different port(s) than Nginx. Only one can run on port 80 and/or 443. If you need Apache sites accessible on port 80 and/or 443 too then you would need Nginx to run as proxy in front of Apache. Or install a whole other proxy, like HAProxy, and run it on ports 80 and/or 443 and then run both Nginx and Apache on other ports.
Thank you, is there a specific way I would have to install Apache for it to work with the panel or would it know it's there?
Basically there is none supported for now. That said, there is however a pending approval code in ISPConfig git which you could try to use both apache2 and nginx in ISPConfig server but it is not advisable to be used in a production server. Do check it out at: https://git.ispconfig.org/ispconfig/ispconfig3/-/merge_requests/1703
WordPress runs fine on Nginx. There is no need to install Apache, it might just be that you have to add a few Nginx rewrite rules if some of your plugins require that. Plus, a pure Nginx setup is faster and is able to handle higher loads than an Apache + Nginx setup. That's why ISPConfig uses it. So, instead of asking to install Apache, a better and easier solution is to add the missing Nginx directives into the Nginx directives field of the website. Which Nginx directives have you added to the Nginx Directives field for WordPress at the moment?
WordPress ships with ready-made write rules for Apache web servers in a .htaccess file. But .htaccess files are used by Apache only. For other servers, you must add the equivalent rewrite rules in the right syntax yourself, and that's what @ahrasis pointed you to.
How would I add the rewrite rules, I have had a look at the link @ahrasis provided but it doesn't say where the file locations would be as it says about "/etc/nginx/nginx.conf" but the file is compleaty different. And also the nginx global directory doesn't seem to be there in "/etc/nginx"
This is not about nginx.conf file and you do not have to edit any config files at all. Login to ISPConfig, go to the sites module, open the setting of that site, go to the options tab of the website, and paste this into the Nginx directives field: Code: location / { try_files $uri $uri/ /index.php$is_args$args; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; access_log off; log_not_found off; } Then press save. Btw. This info is really easy to find on the net, just google "ispconfig wordpress nginx" and you get all the relevant info in the first result.
Ok, so the normal website URL's all work after you added that, this should be the case. if not, you might have a typo in the rules or you added additional rules that are not valid. Have you checked that the rules were part of the vhost file of the website and there is no file with .err file ending in the nginx sites-available folder? if it's just some special plugins that fail and not normal pages, have you contacted the plugin authors and asked them which additional rewrite rules for Niginx their plugins require?
The main page of the website works but when you click on any posts its comes up with a 404 error and looking into that it comes up saying about nginx and apache. I have checked the sites-avaliable folder and nothing in the there with .err. I havent checked the vhosts file as I cant find it. I got the webiste sat in maintainace mode i can always take it out so you have see what i mean with the 404 errors?
That you get 404 errors means that the config I posted in #10 is likely not in place yet. So that is most likely not a plugin-related issue. The vhost file is in the folder /etc/nginx/sites-available/, it has the name of the website domain. The config is enabled with a symlink in the folder /etc/nginx/sites-enabled/
I have attached a screen on the code from the panel, I have restarted the whole server multiple times over the last couple of weeks and still nothing changed