AlmaLinux 9
Sponsored Link

Nginx : Virtual Hostings2023/03/03

This is the Virtual Hostings setting for Nginx.
For example, configure additional domainame [].
[1] Configure Nginx.
[root@www ~]#
vi /etc/nginx/conf.d/
# create new

server {
    listen       80;

    location / {
        root   /usr/share/nginx/;
        index  index.html index.htm;

[root@www ~]#
mkdir /usr/share/nginx/

[root@www ~]#
systemctl reload nginx

[2] Create a test page to verify it works normally.
[root@www ~]#
vi /usr/share/nginx/
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Nginx Virtual Host Test Page
Matched Content