How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

February 6, 2018

Prevent SSL redirect loop using WordPress and HAProxy

Filed under: Linux — Tags: , , , , — admin @ 11:21 am

I do have a haproxy that is serving the ssl frontend and the apache is on 80 port.  But the wordpress see the 80 port and is not forcing to use the ssl as links for css/js

So to force wordpress to generate ssl internal links you need to add this into wp-config.php

define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
  $_SERVER['HTTPS']='on';


Offcourse on the haproxy you need to have

reqadd X-Forwarded-Proto:\ https

 

November 2, 2017

Modify .htaccess on wordpress site to move to new domain

Filed under: Linux — Tags: , , , — admin @ 10:25 am

In order to move the wordpress to new domain you must modify the .htaccess with

 

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.newdomain.com$1 [R=301,L]

July 18, 2012

How to install wordpress plugin without ftp user/password

Filed under: Php — Tags: , , , — admin @ 11:30 am

Hello
Well I try today to install a plugin on a wordpress. But when I try to install it it request me the ftp user password host, for my hosting account.
Well, i try to chmod 777 the wp-content, still the same, so I force the wordpress to not require ftp by adding some code into wp-config.php

So to fix this chmod 777 wp-content
and add
define('FS_METHOD', 'direct');
to wp-config.php

March 31, 2008

In sfarsit am reusit.

Filed under: Scrambled — Tags: , , — admin @ 5:51 pm

Ei …. ce pot spune.

Am reuist sa trec de pe drupal pe wordpress. Nu pot spune ca am facut aceasta schimbare cu vreun programel ceva, ci am trecut posturile manual ( unii ar spune “lucru manual” ).

De acum inainte sa vedem ce se va intampla cu acest blog ( sau cum se mai cheama el )

Powered by WordPress