By Jorge Duarte
Hi everyone,
I’m currently using Docker, and i have installed portainer and done tests using httpd etc.
Basically i have a Node.JS server that i want to be running at server.example.com that is restricted to requests from example.com and dev.example.com ( should i do something except using CORS ? ).
I want to use the example.com and dev.example.com websites at port 80.
Meanwhile this i need to restrict access to phpmyadmin and portainer to only be available in localhost too …
Since i’m a noob at server managament and this is a new world for me yet … i wonder if something can guide me to what i need to do.
For the restrictions i think i need to use ufw / iptables. but i don’t know how i can make this things work together.
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!
Hello,
What I could suggest is using Apache as a reverse proxy for your Node.js applications. You could create 2 different Apache Vhosts for your main site and your dev site.
To set up Apache as a reverse proxy you can follow the steps here:
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.