Porting your Apache configuration

That's it. You've had enough of Apache. You have finally decided to make a complete switch to Nginx. There are quite a few steps ahead of you now, the first of which is to adapt your previous configuration in a way that ensures that your existing websites work 1:1 after the switch.

Directives

This section will summarize some of the common Apache configuration directives, and attempt to provide equivalent replacement solutions from Nginx. The following list gives the order of the default Apache configuration file:

Apache directive

Nginx equivalent

ServerTokens: Apache allows you to configure the information transmitted in the request headers regarding the server OS and the software name and versions.

server_tokens ...

Get Nginx HTTP Server - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.