Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SNaRe's avatar
Level 7

Forge Nginx configuration Problem

Hi,

First, I would like to redirect mydomain.com to www.mydomain.com

Secondly, I would like to host many subdomains in my project. For example when visitors visit asd.com and asd2.com they will all see the content in mydomain.com. Another problem could be mydomain.com has default ssl that is provided by forge but asd.com and asd2.com doesn't have.

I added tried the code below but didn't work.

server {
    server_name mydomain.com;
    return 301 $scheme://www.mydomain.com$request_uri;
}

I added the code to projects nginx file after include forge-conf/mutlumusteri.com/before/*;

before

server {
      proxy_connect_timeout       600;
  proxy_send_timeout          600;
......
0 likes
0 replies

Please or to participate in this conversation.