server {
listen 80;
listen [::]:80;
server_name pma.example.com;
root /usr/share/phpmyadmin/;
index index.php index.html index.htm index.nginx-debian.html;
access_log /var/log/nginx/phpmyadmin_access.log;
error_log /var/log/nginx/phpmyadmin_error.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ ^/(doc|sql|setup)/ {
deny all;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
}
location ~ /\.ht {
deny all;
}
}
Permissions help the server determine which users have the ability to read, write or execute files or folders. More precisely, file permissions include the ability of viewing, editing and running the file as a script, respectively. Folder permissions include viewing the content, adding or removing the files or performing some other actions on the folder.
An NGINX reverse proxy acts as an intermediary between clients and backend servers, routing incoming traffic to the appropriate server based on URL, load balancing, and other criteria. This configuration enhances web application performance, improves security, and provides flexibility in managing traffic to various servers.
A Linux service is a background process that runs continuously to perform specific tasks. Services can start automatically at boot time and run without user intervention. Examples include web servers, database servers, and network services. Below is the command to start, stop and restart ubuntu linux services.
Operating system logs provide a wealth of diagnostic information about your computers, and Linux is no exception. Everything from kernel events to user actions is logged by Linux, allowing you to see almost any action performed on your servers. In this guide, we’ll explain what Linux logs are, where they’re located, and how to interpret them. To display logs please follow command below.
ZIP is an archive file format that supports lossless data compression. A ZIP file may contain one or more files or directories that may have been compressed. The ZIP file format permits a number of compression algorithms, though DEFLATE is the most common.
To secure your our website, we need to use HTTPS. HTTPS uses SSL/TLS to encrypt the traffic between the web server and clients, making it much more secure. However, manually provisioning and renewing SSL/TLS certificates can be a time-consuming and error-prone process.
We can enable HTTPS to our website/domain by installing a free TLS certificate from Let’s Encrypt. To do that, Run the following command to install Let’s Encrypt client (certbot) on Ubuntu server.
To host multiple domain in your Nginx Web Server you need to configure your Nginx web server. To do that you need to configure file /etc/nginx/nginx.conf. and create config file in /etc/nginx/sites-available/your_config.conf and make symbolic link in /ect/nginx/sites-enabled/your_config.conf. Below is nginx.conf and config file for domain.
In Ubuntu Linux, a process refers to the application/program initiated by the user or the system in the background/foreground. Sometimes we need to kill a process to refresh system or to stop application. Killing a process is the act of stopping it abruptly to get rid of any performance bug.
Membangun sebuah website adalah merupakan gabungan dari berbagai system yang saling mendukung, dimulai dari server, sistem oprasi, database, script website, dll sehingga sebuah website dapat diakses secara online melalui sebuah browser.
Halo teman-teman, pada kesempatan kali ini saya akan berbagi beberapa perintah yang susah dihafal, sehingga kita diharuskan membuat catatan. Perintah-perintah ini sering/wajib kita gunakan didalam mengoperasikan atau mengkonfigurasi server linux kita.