running apache and snap(nextcloud)

configured a virtual host with apache for a ticket system that I’m trying, then installed next cloud with snap, tried to run both, but got an error, because of course both of them are using the same port. Aside from running next cloud directly on my VPS instead of using a snap, what can do?, because if I want to use next cloud must stop apache, and to use my ticket service must stop next cloud.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Indeed running two services on the same port at the same time is not possible.

What you could do is change Apache’s port to another non-default port like 8080 or example. That way the two services would be able to run at the same time.

To change Apache’s port open your Apache configuration file and edit the Listen 80 part to Listen 8080. Then run a config test:

apachectl -t

If you get a Syntax OK then restart Apache:

systemctl restart apache2

After that check if Apache is actually listening on the new port:

netstat -plant | grep -i apache2

Finally you should be able to run the nextcloud service on port 80.

Hope that this helps! Regards, Bobby