Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a redirection for "example.com" #5

Open
Matehias opened this issue Sep 26, 2021 · 0 comments
Open

Add a redirection for "example.com" #5

Matehias opened this issue Sep 26, 2021 · 0 comments

Comments

@Matehias
Copy link

Hi,

First, thanks for this very useful guide !

I followed it and all works great but I would like to be able too to use "example.com" in addition of "subdomain1.example.com", "subdomain2.example.com",...

I tried to create a vdomain conf file named "example.com.conf"as follow :

`
server {
listen 443 ssl http2 ;

    server_name example.com;
    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    include snippets/example.com.cert.conf;
    include snippets/ssl-params.conf;

    location / {
            include snippets/proxy-params.conf;
            proxy_pass http://192.168.0.30;
    }

}
`

I also tried to play with the "default-server" parameter but without success. In all cases, it redirect me on the first server in the vdomains folder (by name), even if i change the name of "example.com" conf file to be the first.
Also, I didn't forget to reload the nginx service after modifications.

Any idea to resolve this ? I think it's not so difficult but I'm yet quite a newbie in this kind of stuff ^^

Thanks again for this well explained guide !

PS : of course, i change my real domain name by example.com for this message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant