Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How to do it...

We're going to change the port on which NGINX listens by default, to show how much of a pain SELinux can be.

First, check that NGINX is running on port 80 (the default) by using curl and printing the return code:

$ curl -I localhost:80 HTTP/1.1 200 OKServer: nginx/1.12.2Date: Mon, 29 Oct 2018 17:36:35 GMTContent-Type: text/htmlContent-Length: 3700Last-Modified: Tue, 06 Mar 2018 09:26:21 GMTConnection: keep-aliveETag: "5a9e5ebd-e74"Accept-Ranges: bytes
Using -I here means that we don't pull in a screen full of code, and instead we just get the pertinent information, like the return code (200 being OK).

Cool, so that's all working normally, and SELinux isn't getting in the way.

What if we want NGINX to listen on a different ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content