Category

Ubuntu

Category

I had the same issue with ec2 for php mail. install Sendmail by command: sudo apt-get install sendmail check the service whether it’s started or not by executing following command sudo service sendmail status Note: Output of the above command should be something – ‘Active: active (running)’ start the service if it is not running by the following command sudo service sendmail start After the service is started, send a test mail using the following…

Use this 4 step method to remove the redirect loop and mixed content problems when using ssl in WordPress. 1) Replace ‘http://’ with ‘//’ in database – This create all the relative url’s for images and other assets 2) in wp-config, define generic wp_home and wp_siteurl variables. define(‘WP_HOME’,’//’. $_SERVER[’SERVER_NAME’]); define(‘WP_SITEURL’,’//’. $_SERVER[’SERVER_NAME’]); 3) If you are using a load balancer, use ‘HTTP_X_FORWARDED_PROTO’ server variable to figure out the protocol used. To do this, add this line…

I resolved by doing the following: Check if there is a module called rewrite.load in your apache at: cd /etc/apache2/mods-enabled/ If it does not exist execute the following excerpt: sudo a2enmod rewrite Otherwise, change the Apache configuration file to consolidate use of the “friendly URL”. sudo nano /etc/apache2/apache2.conf Find the following code inside the editor: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Change to: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All…

Add below code within .htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.in [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.in/$1 [R,L] $ sudo nano /etc/apache2/sites-enabled/000-default.conf <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> <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 #…