Hey @Aporia, based on your previous posts I assume you are using Mac OS, can you please try to run the following command via terminal when both DevKinsta and Docker are entirely closed?
Can you please try to go to your DevKinsta Settings page, and there go to the “Port selector” section and un-check the “[ ] Auto-detect open ports” , then put the default port number to each field (HTTP with 80, and HTTPS with 443) then click the confirm button?
I stopped docker and DevKinsta in between. It would appear that DevKinsta’s port change is working for the docker container, but the actual service on the nginx on the container is still running on 80 and 443.
Glad to see it worked!
I would suggest to set/keep them to the default ports (HTTP = 80, HTTPS = 443) in that “Port selector” section (on the DevKinsta Setting page) - I myself also always use these default ports on my DevKinsta settings (in my personal opinion to make the local URL looks clean - without any additional ports):
The default ports do not work for me, because I am still using Mamp Pro. I am experimenting with switching to DevKinsta, but until it is more stable, I need to continue to use Mamp Pro.
Ok, now I think nginx is running fine. I see how it runs on 80 and 443 and that docker maps from the external ports. So what would be different between 80 and 443 and other ports.
The default ports do not work for me, because I am still using Mamp Pro. I am experimenting with switching to DevKinsta, but until it is more stable, I need to continue to use Mamp Pro.
Yeah, if there’s another web service running (Mamp pro or something like that) on your local computer (uses the same/default ports) then that would be conflicting/preventing the other web service (NGINX in this case) to run on those same default ports.
I also had Apache web service ran on my local computer before (on default ports: 80 and 443), and I had to change my DevKinsta ports to something else, so that both Apache and DevKinsta’s (NGINX) local sites would be working just fine - as shown in the following screenshots that I took:
(Apache service was not able to run before when DevKinsta/NGINX was set with the default ports 80/443, and was then working fine after I changed the DevKinsta ports to something else: 8080 and 4343).
I think you misunderstand me. I definitely want and need to run devkinsta on other ports than 80 and 443. I now understand that nginx runs on port 80 and 443 but docker maps external ports to those, so no need to adjust the files in ~/DevKinsta/nginx_sites
You can see here, it is running and working:
39acff3002b0 kinsta/devkinsta_nginx:1.3.1 “/docker-entrypoint.…” 5 hours ago Up 3 seconds 80/tcp, 443/tcp, 0.0.0.0:51350-51351->51350-51351/tcp devkinsta_nginx
However, when I try to access that url, i get an error and I do not know what is happening
Yeah I understood that you would want / need to run DevKinsta on custom ports other than 80 and 443.
It should work as I tested and showed in the previous screenshots before, that I changed the ports to 8080 and 4343.
I also just tried once again now to change the ports to: 51350 (HTTP) and 51351 (HTTPS)
Have you tried to access your local URL (with custom port) with different browser(s) to compare? and may also want to test via cURL command line to see the results? as I was not able to replicate the error on my local computer.
My ~/DevKinsta/nginx_sites/cheeseclubhk.conf is not showing the changed ports. Why wouldn’t it get updated?
I manually updated that file. I had actually tried to update this file before, but I think I did it on the image, which might get overwritten?
Anyway, it is working. I am going to continue to play with this, including doing a sync. I am hoping for it work better so I can get some colleagues using it.
Thank you for your reply Darcy
I’m not sure either why that .conf file ( ~/DevKinsta/nginx_sites/cheeseclubhk.conf ) wouldn’t get updated on your local computer.
Mine got updated automatically each time I modified and saved the new ports in DevKinsta.
Before:
agus@Lenovo-IdeaPad-FLEX-15IWL:~/DevKinsta/nginx_sites$ ll
total 56
drwxrwxrwx 2 root root 4096 Mei 30 14:43 ./
drwxrwxrwx 9 root root 4096 Feb 11 22:52 ../
-rwxrwxrwx 1 agus agus 1025 Mei 30 14:43 agustest.conf*
agus@Lenovo-IdeaPad-FLEX-15IWL:~/DevKinsta/nginx_sites$ head -8 agustest.conf
server {
set $site_name agustest;
set $php_path devkinsta_fpm:9003;
listen 51350;
listen [::]:51350;
listen 51351 ssl http2;
listen [::]:51351 ssl http2;
After I changed the ports once again in DevKinsta’s settings/port selector (to the default ports) :
agus@Lenovo-IdeaPad-FLEX-15IWL:~/DevKinsta/nginx_sites$ ll
total 56
drwxrwxrwx 2 root root 4096 Mei 31 07:40 ./
drwxrwxrwx 9 root root 4096 Feb 11 22:52 ../
-rwxrwxrwx 1 agus agus 1015 Mei 31 07:40 agustest.conf*
agus@Lenovo-IdeaPad-FLEX-15IWL:~/DevKinsta/nginx_sites$ head -8 agustest.conf
server {
set $site_name agustest;
set $php_path devkinsta_fpm:9003;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
agus@Lenovo-IdeaPad-FLEX-15IWL:~/DevKinsta/nginx_sites$ stat agustest.conf
File: agustest.conf
Size: 1015 Blocks: 8 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 15098889 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1000/ agus) Gid: ( 1000/ agus)
Access: 2023-05-31 07:40:36.864561314 +0700
Modify: 2023-05-31 07:40:35.284540298 +0700
Change: 2023-05-31 07:40:35.284540298 +0700
Birth: 2023-05-31 07:40:35.284540298 +0700
It didn’t require me to update this .conf file manually (I’ve never done/edited it).
Glad to hear it’s working! Sounds great! please take your time and hopefully your colleagues can also using it! and you’re always welcome sir!