NGINX
xxxxxxxxxx
server {
# .domain.com will match both domain.com and anything.domain.com
server_name .example.com;
# It is best to place the root of the server block at the server level, and not the location level
# any location block path will be relative to this root.
root /usr/local/www/example.com;
# It's always good to set logs, note however you cannot turn off the error log
# setting error_log off; will simply create a file called 'off'.
access_log /var/log/nginx/example.access.log;
error_log /var/log/nginx/example.error.log;
# This can also go in the http { } level
index index.html index.htm index.php;
location / {
# if you're just using wordpress and don't want extra rewrites
# then replace the word @rewrites with /index.php
try_files $uri $uri/ ;
}
location {
# Can put some of your own rewrite rules in here
# for example rewrite ^/~(.*)/(.*)/? /users/$1/$2 last;
# If nothing matches we'll just send it to /index.php
rewrite ^ /index.php last;
}
# This block will catch static file requests, such as images, css, js
# The ?: prefix is a 'non-capturing' mark, meaning we do not require
# the pattern to be captured into $1 which should help improve performance
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# remove the robots line if you want to use wordpress' virtual robots.txt
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
# this prevents hidden files (beginning with a period) from being served
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ \.php {
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass 127.0.0.1:9000;
}
}
Linux - কিভাবে anc-api-tools ইনস্টল করবেন
Linux - কিভাবে curvedns ইনস্টল করবেন
Python - একটি সংখ্যা ইতিবাচক, নেতিবাচক বা 0 কিনা তা পরীক্ষা করুন
Linux - কিভাবে zenmap ইনস্টল করবেন
C - একটি পূর্ণসংখ্যা সংখ্যা গণনা
C++ - একটি নম্বর প্রাইম কি না তা পরীক্ষা করুন
C++ - লিপ ইয়ার চেক করুন
C - ডায়নামিক মেমরি বরাদ্দ ব্যবহার করে সবচেয়ে বড় সংখ্যা খুঁজুন
JavaScript - একটি স্ট্রিং নির্দিষ্ট অক্ষর দিয়ে শুরু হয় এবং শেষ হয় কিনা তা পরীক্ষা করুন
Kotlin - একটি সংখ্যা বিপরীত
Linux - কিভাবে xbitmaps ইনস্টল করবেন
Linux - কিভাবে zstd ইনস্টল করবেন
Kotlin - একটি সংখ্যাকে n দশমিক স্থানে বৃত্তাকার করুন
Python - এক্সেল (XLSX) ফাইল লেখা
C++ - ভাগফল এবং অবশিষ্টাংশ খুঁজুন
Java - একটি সংখ্যা বিপরীত
Kotlin - একটি সংখ্যার ফ্যাক্টরিয়াল খুঁজুন
Linux - কিভাবে zfs-test ইনস্টল করবেন
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month