Posts

Showing posts from 2015

Increase request timeout Inginx

make following changes to /etc/nginx/nginx.conf -  location / { proxy_connect_timeout  600s; proxy_send_timeout  600s; proxy_read_timeout  600s; fastcgi_send_timeout 600s; fastcgi_read_timeout 600s; ... }

Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

When you try to send mail from code and you find the error "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required", than the error might occur due to following cases. case 1: when the password is wrong case 2: when you try to login from some App case 3: when you try to login from the domain other than your time zone/domain/computer (This is the case in most of scenarios when sending mail from code) There is a solution for each  Solution for  case 1: Enter the correct password. solution for  case 2: go to security settings at the followig link https://www.google.com/settings/security/lesssecureapps and enable less secure apps . So that you will be able to login from all apps. solution 1 for case 3: (This might be helpful) you need to review the activity. but reviewing the activity will not be helpful due to latest security standards the link will not be useful. So ...

How to redirect to specific tomcat port from nginx configuration

1: Create a file /etc/nginx/conf.d/example.conf 2: sudo chmod +x /etc/nginx/conf.d/example.conf 3: Copy this content and change the domain name according to you domain. server {     server_name  example.com;     rewrite ^(.*) http://www.example.com$1 permanent; } server {   listen          80 default_server;   listen [::]:80 default_server ipv6only=on;   server_name     www.example.com;   root            /opt/apache-tomcat-8.0.24/webapps/ROOT;   location / { proxy_set_header X-Forwarded-Host $host;         proxy_set_header X-Forwarded-Server $host;         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_pass http://127.0.0.1:8080/;   } error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html; } }

Porxy for apache to tomcat redirect

1: Open file /etc/apache2/sites-enabled/000-default.conf 2: Change content 3: Restart apache2 <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost ProxyRequests Off     <Proxy *>         Order deny,allow         Allow from all     </Proxy>     ProxyPreserveHost on     ProxyPass / http://localhost:8080/ DocumentRoot /var/www/html # Available ...