how can I run 2 sites, one requires reverse proxy, other is just a normal website.

The .NET core API requires apache set up as reverse proxy. How can I run both the web API and my other normal web site that doesn’t require any reverse proxy stuff.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


You need to use a different apache configuration file for each one of them.

I will assume that you have DNS record for the .net core web API and DNS record for the laravel application, here is an example config for each one of them.

The first one webapi.conf

<VirtualHost *:80>

ErrorLog ${APACHE_LOG_DIR}/net_error.log
CustomLog ${APACHE_LOG_DIR}/net_access.log combined
ProxyPassReverse "/" <url to net core api with / at the end>


The second one laravel-app.conf

DocumentRoot (path to local laravel application)

<Directory (path to local laravel application)>
       AllowOverride All
ErrorLog ${APACHE_LOG_DIR}/laravel_error.log
CustomLog ${APACHE_LOG_DIR}/laravel_access.log combined

Enable the two new sites

sudo a2ensite webapi.conf
sudo a2ensite
sudo service apache2 restart

Now you can access the net core API with this url and the laravel application with this url