ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Is it possible to use Apache instead of nginx as the Web Server?


#1

Hello,

I am struggling with ERPNext installation since last week. Finally, I think I am in the final step.

When installer is trying to launch nginx, it throws an error because port 80 is used by Apache.

I tried by changing port in /etc/nginx/conf.d/default.conf file to 8080, but it is not taken into account.

Any help will be greatly appreciated.

Regards
Jaime


#2

Try reading here:

BKM


#3

I have read that before posting, but the answer there was: “You can use apache in front of Default nginx of ErpNext. Just proxypass all your requests from apache to nginx”.

I cannot even start nginx… if I would be able to start nginx, I could do that. The problem is that the ERPNext installer tries to launch nginx and since nginx cannot be started, installer exists.

Regards
Jaime


#4

There can be several configuration files involved. Check the following:

  • /etc/nginx/nginx.conf
  • /etc/nginx/conf.d/default.conf (you already mentioned this one).
  • /etc/nginx/sites-enabled/* (may be empty)

I just completed 2 installations over the weekend, so it’s all pretty fresh in my mind. I didn’t have another web server (like Apache) previously installed, though.

It may be easier to shutdown Apache temporarily. Let ERPNext finish its installation. Then modify Nginx, change ports, and bring Apache back online.

ERPNext installation sometimes makes a lot of assumptions about what you do/don’t want.


#5

I don’t have sites-enabled folder. Host and port is only available in default.conf file.

I could do what you suggested, however, I cannot have Apache off line for long time so I need to be sure it it will work.

I changed port in default.conf and try to manually start nginx but it still tries to use port 80.

However, I think starting nginx is the last step in the ERPNext installation so I guess ERPNext files are already fully installed. Where are ERPNext pages installed so that I can configure Apache to point to that folder?

Regards
Jaune


#6

@Jaime_Stuardo

Sure it’s possible to use different components of the tech stack in general but that does mean it will be easy to swap. :slight_smile:
In this case you should change the nginx config file under frappe-bench folder to change the port there and then reload nginx