Deployment/Apache: Difference between revisions
From charlesreid1
(→PHP) |
(→PHP) |
||
| Line 15: | Line 15: | ||
==PHP== | ==PHP== | ||
===Set Up PHP=== | |||
Make sure you have php installed: | Make sure you have php installed: | ||
| Line 40: | Line 42: | ||
(not sure if I can do this if I have email forwarding only set up) | (not sure if I can do this if I have email forwarding only set up) | ||
Also see [https://www.thesitewizard.com/php/install-php-5-apache-windows.shtml] | Also see [https://www.thesitewizard.com/php/install-php-5-apache-windows.shtml] and [https://help.ubuntu.com/lts/serverguide/httpd.html] | ||
===Enable PHP in Apache=== | |||
==SSL== | ==SSL== | ||
Revision as of 10:15, 28 October 2017
Deploying Apache Server
Conf
Configuration file is in /etc/apache2/apache2.conf
Edit:
- Directory tag corresponding to one-level-up from your web root
Sites Available and Sites Enabled
This always throws me off.
Edit sites-available/000-default.conf (or make your own conf file in sites-available).
PHP
Set Up PHP
Make sure you have php installed:
$ apt-get install -y php
PHP configuration file is in /etc/php/7.0/cli/php.ini
Things you might wanna change:
short_open_tag = On- enables short php open tag <?magic_quotes_gpc = On- puts slashes before quotes in user inputdisplay_errors = Offif your site is live
If you want to send mail, look for the MAIL FUNCTION section:
[mail function] SMTP = mail.example.com smtp_port = 25 sendmail_from = noreply@yourdomain.com
(not sure if I can do this if I have email forwarding only set up)
Enable PHP in Apache
SSL
See LetsEncrypt for creation of SSL certificate.