Apache som proxyserver i CentOS 7: Difference between revisions
Jump to navigation
Jump to search
m →Servern |
mNo edit summary |
||
| Line 57: | Line 57: | ||
</VirtualHost> | </VirtualHost> | ||
}} | }} | ||
== Allmänt webserver == | |||
{{RootCmd|setsebool -P httpd_can_network_connect_db=on | |||
|setsebool -P httpd_can_connect_ldap=on}} | |||
== Wordpress == | == Wordpress == | ||
| Line 70: | Line 74: | ||
define('FORCE_SSL_ADMIN', true); | define('FORCE_SSL_ADMIN', true); | ||
}} | }} | ||
[[Category:Guide]] | [[Category:Guide]] | ||
Revision as of 23:17, 31 October 2015
Under utveckling.
Proxyn
installera:
<VirtualHost *:80>
ServerName centos1.kerwien.se
ProxyPreserveHost On
ProxyPass /app1 http://centos3.kerwien.se/app1
ProxyPassReverse /app1 http://centos3.kerwien.se/app1
ProxyPass /mediawiki http://centos3.kerwien.se/mediawiki
ProxyPassReverse /mediawiki http://centos3.kerwien.se/mediawiki
ProxyPass /wordpress http://centos3.kerwien.se/wordpress
ProxyPassReverse /wordpress http://centos3.kerwien.se/wordpress
ProxyPass /phpbb http://centos3.kerwien.se/phpbb
ProxyPassReverse /phpbb http://centos3.kerwien.se/phpbb
</VirtualHost>
ssl.conf:
ServerName centos1.kerwien.se:443 RequestHeader set X-Forwarded-Proto "https" #ProxyRequests Off #ProxyPreserveHost On ProxyPass /app1 http://centos3.kerwien.se/app1 ProxyPassReverse /app1 http://centos3.kerwien.se/app1 ProxyPass /mediawiki http://centos3.kerwien.se/mediawiki ProxyPassReverse /mediawiki http://centos3.kerwien.se/mediawiki ProxyPass /wordpress http://centos3.kerwien.se/wordpress ProxyPassReverse /wordpress http://centos3.kerwien.se/wordpress ProxyPass /phpbb http://centos3.kerwien.se/phpbb ProxyPassReverse /phpbb http://centos3.kerwien.se/phpbb
Servern
http.conf
<VirtualHost *:80>
ServerName centos1.kerwien.se
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy centos1.kerwien.se
</VirtualHost>
Allmänt webserver
Wordpress
wp-config.php:
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
/**
* Force login and administration over SSL.
*/
define('FORCE_SSL_ADMIN', true);