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

NGINX server_tokens off #1014

Open
cristiam86 opened this issue Sep 26, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@cristiam86
Copy link

commented Sep 26, 2018

Mup version (mup --version): 1.4.5

I'm trying to set the server_tokens directive to off by setting a local nginx.conf file with that line and pointing to that file under proxy.nginxServerConfig mup configuration. I've also tried it with the proxy.nginxLocationConfig without success.

Can anybody please suggest how to accomplish that?

@zodern zodern added the Proxy label Sep 27, 2018

@zodern

This comment has been minimized.

Copy link
Owner

commented Sep 27, 2018

Could you please show your mup config (mup validate --scrub) and your nginx config file?

@cristiam86

This comment has been minimized.

Copy link
Author

commented Sep 27, 2018

Thanks @zodern for the quick response.

My mup config
{
"servers": {
"one": {
"host": "1.2.3.4",
"username": "ubuntu",
"pem": "~/.ssh/pem"
}
},
"proxy": {
"domains": "test.myproject-example.com",
"nginxServerConfig": "./nginx.conf",
"nginxLocationConfig": "./nginx.conf"
},
"app": {
"name": "my-app",
"path": "/Users/home/my-project",
"servers": {
"one": {}
},
"buildOptions": {
"serverOnly": true
},
"env": {
"ROOT_URL": "https://subdomain.host.com",
"MONGO_URL": "mongodb://mongodb:27017/my-app",
"VIRTUAL_HOST": "test.myproject-example.com,
"HTTPS_METHOD": "noredirect",
"HTTP_FORWARDED_COUNT": 1
},
"docker": {
"image": "abernix/meteord:node-8.4.0-base",
"stopAppDuringPrepareBundle": true,
"args": [
"--link=mongodb:mongodb"
]
},
"enableUploadProgressBar": true,
"type": "meteor"
},
"mongo": {
"version": "3.4.1",
"servers": {
"one": {}
}
}
}

My nginx config file
server_tokens off more_set_headers 'Server: my-server';

Thanks!

@cristiam86

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Hello again @zodern, sorry for the insistence on asking again. Do you have any clue on this? Would it be possible to override the nginx config with a /etc/nginx/default.conf ?
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.