Install Custom Servers on Top of Existing Servers

I would like to install Nginx + PHP-FPM. At the moment, I’ve installed default servers in the VPS, so is there any way to override the default installation or should I format the instance and start over the installation process?

For Nginx + php-fpm this works fine

1 Like

Many thanks @eris would you please tell me how I should run it? It looks like a bash file, but does the path exist in the hestia folder by default or do I have to upload the file you mention?

/usr/local/hestia/install/upgrade/manual/

And you should be able to find it…


Many thanks @eris. I got installed the script. Now, when I enable the FastCGI option, the nginx server failed to restart. I have WordPress site with a Redis server connected via the Object Cache Redis plugin. Seems that Redis with FactCGI don’t like each other, don’t they?

Should work fine

systemctl status nginx?

× nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-05-13 16:33:38 EEST; 7s ago
       Docs: https://nginx.org/en/docs/
    Process: 97938 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
        CPU: 6ms

May 13 16:33:38 hcp.shavecode.codes systemd[1]: Starting nginx - high performance web server...
May 13 16:33:38 hcp.shavecode.codes nginx[97938]: nginx: [emerg] the shared memory zone "shavecode.codes" is already declared for a different use in>
May 13 16:33:38 hcp.shavecode.codes systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 13 16:33:38 hcp.shavecode.codes systemd[1]: nginx.service: Failed with result 'exit-code'.
May 13 16:33:38 hcp.shavecode.codes systemd[1]: Failed to start nginx - high performance web server.

@eris

@eris I’ve deleted /etc/nginx/conf.d/01_caching_pool.conf and the server restarts fine.

One last thing, I would like to use Smush Pro I’ve done a couple of research in the fourm and found I need to do some changes in wordpress.tpl in this section:

       try_files $uri $uri/ /index.php?$args;
        location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
            expires 30d;
            fastcgi_hide_header "Set-Cookie";
        }

Then the modified one would be like below:

 location / {
        # BEGIN SMUSH-WEBP
location ~* "wp-content\/(uploads\/)(.*\.(?:png|jpe?g))" {
        add_header Vary Accept;
        set $image_path $2;
        if (-f "/home/Hussein/web/shavecode.codes/public_html/wp-content/smush-webp/disable_smush_webp") {
                break;
        }
        if ($http_accept !~* "webp") {
                break;
        }
        expires max;
        try_files /wp-content/smush-webp/$image_path.webp $uri =404;
}
# END SMUSH-WEBP

I know I need to do the same change in wordpress.stpl too, but still no luck with followed the instructions.