Skip to main content

nginx on Ubuntu

nginx - HTTP and reverse proxy server, mail proxy server.

Install: sudo apt install nginx
Install: sudo apt install nginx

Check version: nginx -v
Check version: nginx -v

/etc/nginx/nginx.conf

events {
    work_connections    1024;
}

http {
    # Hide version
    server_tokens    off;
    # Enable gzip compression
    gzip    on;
    # Enable cache
    expires    365d;

    server {
        listen    80;
        server_name    localhost;

        location / {
            root html;           
        }
        
        # PHP-CGI configuration
        location ~ \.php$ {
            fastcgi_pass    127.0.0.1:9000;
            fastcgi_index   index.php;     
            fastcgi_param   SCRIPT_NAME    $document_root$fastcgi_script_name;
            include         fastcgi_params; 
        }

    }
}

sudo apt update
sudo apt install -y nginx : Install nginx

nginx -v : Check nginx version
nginx -V : Check nginx version, compiler version, and configure script parameters

/etc/nginx/nginx.conf : nginx default configuration file
/var/log/nginx/ : nginx default log directory

Errors

sudo apt update

nginx N: Skipping acquire of configured file 'nginx/binary-i386/Packages' as repository 'http://nginx.org/packages/mainline/ubuntu bionic InRelease' doesn't support architecture 'i386'

Edit /etc/apt/sources.list file

# deb https://nginx.org/packages/mainline/ubuntu/ bionic nginx
# deb-src https://nginx.org/packages/mainline/ubuntu/ bionic nginx
deb [arch=amd64] https://nginx.org/packages/mainline/ubuntu/ bionic nginx
deb-src [arch=amd64] https://nginx.org/packages/mainline/ubuntu/ bionic nginx

Popular posts from this blog

hmailserver: Notes from the field

hmailserver is one of free open source mail servers running on Microsoft Windows operating system.

stegseek: Notes

StegCracker has been retired following the release of StegSeek, which will blast through the rockyou.txt wordlist within 1.9 second as opposed to StegCracker which takes ~5 hours.

VMware ESXi host loads ipmi_si_drv too long

Workaround: remove ipmi_si_drv esxcli software vib remove --dry-run --vibname ipmi-ipmi-si-drv esxcli software vib remove --vibname ipmi-ipmi-si-drv ~ # esxcli software vib remove --dry-run --vibname ipmi-ipmi-si-drv Removal Result    Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller]    Reboot Required: true    VIBs Installed:    VIBs Removed: VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.550.0.0.1331820    VIBs Skipped: ~ # ~ # esxcli software vib remove --vibname ipmi-ipmi-si-drv Removal Result    Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.    Reboot Required: true    VIBs Installed:    VIBs Removed: VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.550.0.0.1331820    VIBs Skipped: ~ #