Jump to content

Nginx:Virtual Host Sederhana: Difference between revisions

From Wiki
Created page with " server { listen 80; server_name example.com www.example.com; root /var/www/example.com/public_html; index index.html; access_log /var/log/nginx/example.com.access.log; error_log /var/log/nginx/example.com.error.log; } ==Source== *[https://websiteforstudents.com/how-to-set-up-a-nginx-server-block-on-ubuntu-linux/ websiteforstudents.com]"
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
server {
<syntaxhighlight lang="nginx" line="1">
    listen 80;
server {
    listen 80;
    server_name example.com www.example.com;
 
    server_name example.com www.example.com;
    root /var/www/example.com/public_html;
 
    root /var/www/example.com/public_html;
    index index.html;
 
    index index.html;
    access_log /var/log/nginx/example.com.access.log;
 
    error_log /var/log/nginx/example.com.error.log;
    access_log /var/log/nginx/example.com.access.log;
}
    error_log /var/log/nginx/example.com.error.log;
}
</syntaxhighlight>
 
== Terkait ==
 
* [[Nginx]]
* [[Nginx:Allow Indexing]]
* [[Nginx:GZIP]]


==Source==
==Source==
*[https://websiteforstudents.com/how-to-set-up-a-nginx-server-block-on-ubuntu-linux/ websiteforstudents.com]
*[https://websiteforstudents.com/how-to-set-up-a-nginx-server-block-on-ubuntu-linux/ websiteforstudents.com]
[[Category:Server]]
[[Category:Web Server]]
[[Category:Nginx]]

Latest revision as of 06:58, 29 August 2022

server {
    listen 80;

    server_name example.com www.example.com;

    root /var/www/example.com/public_html;

    index index.html;

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

Terkait

Source