![Enable CORS in Nginx](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Enable CORS in Nginx
To enable CORS in nginx, add following inside web sites sevrer config. add_header ‘Access-Control-Allow-Origin’ ‘*’; add_header ‘Access-Control-Allow-Credentials’ ‘true’; add_header ‘Access-Control-Allow-Methods’
![List installed Modules in Nginx](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
List installed Modules in Nginx
To list modules compiled with nginx, you can run nginx -V nginx -V This print nginx version along with configuration
![Nginx remove html from url](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Nginx remove html from url
If you have a static website build using plain html files, your url will look like https://yourdomain/page.html. This .html extension
![Nginx show full url in access log](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Nginx show full url in access log
To show the full URL in the nginx access log, add the following If you are behind a reverse proxy,
![Nginx Web Server](https://serverok.in/wp-content/uploads/2018/12/nginx.jpg)
Nginx HTTP 414 request-URI too large
On a Nginx server, when accessing a long url, i get error HTTP 414 Request-URI Too Large To fix the
![Nginx Web Server](https://serverok.in/wp-content/uploads/2018/12/nginx.jpg)
Show Real IP Nginx Behind Reverse Proxy
When your Nginx web server is running behind a reverse proxy, you will see IP of the reverse proxy server
![Nginx Location Directive](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Nginx Location Directive
Nginx Location Directive is used to route request to correct files. Match Exact match is used to match an exact
![nginx password protect](https://serverok.in/wp-content/uploads/2019/08/nginx-password-protect-280x180.png)
Nginx Password Protect a website
To password protect a website, you need to install htpasswd utility. On Ubuntu/Debian, you can install it with the command
![Configure Nginx to listen on single IP Address](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Configure Nginx to listen on single IP Address
By default Nginx listens on all IP address on a server. To make nginx listen on specific IP address, edit
![Nginx Web Server](https://serverok.in/wp-content/uploads/2018/12/nginx.jpg)
Nginx Config for Laravel Application in sub folder
To run Laravel Application on a subfolder of a website, use the following configuration. If you run the Laravel application
![Nginx Config for Laravel Application](https://serverok.in/wp-content/themes/understrap-child/images/default.webp)
Nginx Config for Laravel Application
Here is Nginx configuration for a laravel application server { listen 80; server_name www.domain.com; access_log /var/log/nginx/domain.com.log; root /home/domain.com/html/public; index index.html
![nmap](https://serverok.in/wp-content/uploads/2019/02/nmap-ssl.png)
Disable TLSv1 in Nginx
To disable TLSv1 in nginx, add ssl_protocols TLSv1.1 TLSv1.2; in your server config. if you are using letsencrypt SSL, edit