SatelliteWP / rocket-nginx

Rocket-Nginx is a Nginx configuration that makes WP-Rocket even faster by serving static pages directly without loading WordPress or PHP.
MIT License
579 stars 129 forks source link

Upgrade to version 3 #170

Closed Webtica closed 2 years ago

Webtica commented 2 years ago

Hi,

We saw today that version 3 is released and the notes say to start from scratch. Are there steps to uninstall V2? and then follow the steps to install V3.

Thanks

maximejobin commented 2 years ago

I would rename the folder to rocket-nginx-old. Then, clone the project again. Finally, recreate the rocket-nginx.ini file using the old configuration values (if you modified the original configuration).

Once you've "migrated" successfully, you can delete the old folder.

Make sure to nginx -t (test) your new configuration before reloading your configuration (service nginx reload). That way, if your configuration has an error, you'll know it before you reload it.

I hope this helped.

Webtica commented 2 years ago

Hi @maximejobin,

I moved the folder to rocket-nginx-old and did the steps again:

  1. move to folder /etc/nginx/
  2. run git clone https://github.com/satellitewp/rocket-nginx.git
  3. cd into rocket-nginx
  4. Run cp rocket-nginx.ini.disabled rocket-nginx.ini
  5. Run php rocket-parser.php
  6. Then when I do nginx -t after adding include rocket-nginx/cond.d/default.conf; to my nginx block I get the following error:

nginx: [emerg] open() "/etc/nginx/rocket-nginx/cond.d/default.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/sitename.be:55 nginx: configuration file /etc/nginx/nginx.conf test failed

Any idea what went wrong? Thanks

maximejobin commented 2 years ago

nginx: [emerg] open() "/etc/nginx/rocket-nginx/cond.d/default.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/sitename.be:55

It seems like the paths are wrong. You wrote cond.d (with a 'd') instead of conf.d (with an 'f').

But you took that from the documentation which had a typo. I just fixed it.

Good catch! ;-)

Webtica commented 2 years ago

AH! I see haha! Got it working now thanks!