Jump to content
Froxlor Forum
  • 0

Switch from apache to nginx with v2


Duane Raymond

Question

Hi. Does anyone have success / tips for switching from Aoache2 to Nginx using Froxlor on Debian 10?

The old forum instructions say to 

  1. Stop cron jobs
  2. Switch the webserver configuration to Nginx and follow the instructions (which required running a json script which installed nginx and did other config work)
  3. Rerun the cronjob with the force option: /var/www/html/froxlor/bin/froxlor-cli froxlor:cron -f
  4. Restart the cron service

However with Froxlor v2.0.10 this didn't quite work that smoothly (no existing websites loaded, but nginx seemed to start fine).

I've ended up rolling back to Apache2 using: bin/froxlor-cli froxlor:config-services --apply='{"http":"apache2","dns":"bind","smtp":"x","mail":"x","ftp":"x","distro":"buster","system":[]}' 

I've used the pay-for-help https://froxlor.support service a lot to help solve other problems and it is fantastic, but I thought I'd try here as I suspect others will need whatever answers I find :-)

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thanks d00p, here is what I did this time to get it working on Debian 10:

  1. Stop cron jobs (via: service cron stop)
  2. Switch the webserver setting to Nginx (via: System > Settings > Webserver > select Nginx)
  3. Change any references to apache2 paths to nginx paths (I verified the new paths first, htpassword is created if missing, not sure about the others) and turn off Apache only switches
  4. Changed the SSL path settings to be nginx (via: System > Settings > SSL) 
  5. For each IP entry under 'Resources > IP and Posts' remove Apache-specific vHost/SSL settings/directives (e.g. Include) - I made mine empty
  6. Now it should be ready to switch via 'System > Configuration > HTTP' select nginx and it will give instructions for a command line to reconfigure your system
  7. Once complete, manually run the cronjob with the force option: /var/www/html/froxlor/bin/froxlor-cli froxlor:cron -f
  8. Stop Apache (not sure these last two steps are necessary, but I did them anyway)
  9. Start nginx if necessary (my failures for it to start led me to the 'Resources > IP and Posts'  changes above) and once it starts, test it all works 
  10. Restart the cron service and monitor to ensure it keeps running 🙂

If anyone else had anything to add/suggest, feel free...but so far it is all switched over and working fine.

edit: I also had to update /etc/nginx/nginx.conf by uncommenting: server_names_hash_bucket_size 64;

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...