apache2_ssl_php5_mysql5
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apache2_ssl_php5_mysql5 [2022/07/19 20:13] – external edit 127.0.0.1 | apache2_ssl_php5_mysql5 [2022/07/24 15:41] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Apache2_SSL_PHP5_MySQL5 | + | ===== Apache2_SSL_PHP5_MySQL5 ===== |
- | ====== Install ====== | + | ==== Install ==== |
+ | < | ||
| | ||
/ | / | ||
#I found that I had to restart apache once more to get php to work. | #I found that I had to restart apache once more to get php to work. | ||
+ | </ | ||
- | ===== phpinfo test ===== | + | ==== phpinfo test ==== |
+ | < | ||
vi / | vi / | ||
- | < | + | #Add in the following: |
<? | <? | ||
+ | </ | ||
- | < | + | Browse to: http:// |
- | http:// | + | |
=== If the phpinfo.php file does not show === | === If the phpinfo.php file does not show === | ||
+ | < | ||
/ | / | ||
+ | </ | ||
====== Default SSL Setup ====== | ====== Default SSL Setup ====== | ||
+ | < | ||
| | ||
| | ||
/ | / | ||
/ | / | ||
+ | </ | ||
- | < | + | Browse to: https:// |
- | https:// | + | |
- | ===== Custom SSL Cert Setup ===== | + | ==== Custom SSL Cert Setup ==== |
+ | < | ||
mkdir / | mkdir / | ||
cd / | cd / | ||
Line 33: | Line 40: | ||
vi / | vi / | ||
- | < | + | #update the following: |
| | ||
| | ||
- | + | </ | |
- | ===== Debian SSL Cert Setup ===== | + | ==== Debian SSL Cert Setup ==== |
The above config is my way of creating a SSL cert for apache using openssl. Debian squeeze has a make-ssl-cert utility. | The above config is my way of creating a SSL cert for apache using openssl. Debian squeeze has a make-ssl-cert utility. | ||
See: / | See: / | ||
- | ====== Vhost Setup including SSL ====== | + | ===== Vhost Setup including SSL ===== |
This config sets up multiple vhosts, and allows https access to each vhost. If you use the default-ssl setup with debian squeeze you may get the error: | This config sets up multiple vhosts, and allows https access to each vhost. If you use the default-ssl setup with debian squeeze you may get the error: | ||
| | ||
... waiting [[Fri|Apr 08 15:02:33 2011]] [warn] _default_ VirtualHost overlap on port 443, the first has precedence | ... waiting [[Fri|Apr 08 15:02:33 2011]] [warn] _default_ VirtualHost overlap on port 443, the first has precedence | ||
- | ===== Config Change ===== | + | ==== Config Change ==== |
+ | < | ||
vi / | vi / | ||
- | < | + | #Add-in the following above Listen 443 |
| | ||
+ | </ | ||
- | ===== Update Default vhosts | + | ==== Update Default vhosts ==== |
I prefer to tidy up the vhosts a little, calling vhost configs 01-sitexz, 02-sitexy. Note: the 01-sitexz, because it is listed first, ordered by filename, is the default vhost for the server. I.E. if you browse to the http:// | I prefer to tidy up the vhosts a little, calling vhost configs 01-sitexz, 02-sitexy. Note: the 01-sitexz, because it is listed first, ordered by filename, is the default vhost for the server. I.E. if you browse to the http:// | ||
+ | < | ||
cd / | cd / | ||
cat default-ssl >> default | cat default-ssl >> default | ||
mv default 01-default | mv default 01-default | ||
vi / | vi / | ||
- | < | + | #change < |
- | < | + | #to |
< | < | ||
| | ||
rm / | rm / | ||
| | ||
- | < | + | #all a2ensite does is to create a symlink from sites-available into sites-enabled |
+ | </ | ||
- | ===== Create second test vhost with ssl ===== | + | ==== Create second test vhost with ssl ==== |
+ | < | ||
vi / | vi / | ||
< | < | ||
Line 111: | Line 123: | ||
| | ||
/ | / | ||
+ | </ | ||
- | ===== Test ===== | + | ==== Test ==== |
Browse to: http:// | Browse to: http:// | ||
You will have to accept the SSL cert warning, however all vhosts should show up correct. | You will have to accept the SSL cert warning, however all vhosts should show up correct. | ||
+ | |||
+ | |||
+ | ===== Sample vhost config with Proxy ===== | ||
+ | < | ||
+ | < | ||
+ | ProxyRequests Off | ||
+ | ProxyPreserveHost On | ||
+ | ProxyPass / http:// | ||
+ | ProxyPassReverse / http:// | ||
+ | ServerName www.tom.me | ||
+ | ServerAlias *tom.me | ||
+ | CustomLog / | ||
+ | ErrorLog / | ||
+ | </ | ||
+ | < | ||
+ | ProxyRequests Off | ||
+ | ProxyPreserveHost On | ||
+ | ProxyPass / https:// | ||
+ | ProxyPassReverse / https:// | ||
+ | ServerName www.tom.me | ||
+ | ServerAlias *tom.me | ||
+ | CustomLog / | ||
+ | ErrorLog / | ||
+ | |||
+ | SSLProxyEngine On | ||
+ | SSLEngine on | ||
+ | SSLCertificateFile | ||
+ | SSLCertificateKeyFile / | ||
+ | BrowserMatch "MSIE [2-6]" \ | ||
+ | nokeepalive ssl-unclean-shutdown \ | ||
+ | downgrade-1.0 force-response-1.0 | ||
+ | # MSIE 7 and newer should be able to use keepalive | ||
+ | BrowserMatch "MSIE [17-9]" | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ |
apache2_ssl_php5_mysql5.1658261600.txt.gz · Last modified: 2022/07/19 20:13 by 127.0.0.1