Added methods for Installing PHP and configuring Virtual Hosts in Apache (#26359)
* Added Basic Configuration Settings for apache * Added More Methods of Installing PHP on Windows and Ubuntupull/27016/head^2
parent
28c02d4b24
commit
6816c92620
|
@ -61,12 +61,27 @@ The `-R` flag will cause grep to search recursively through the `/etc` directory
|
|||
/etc/httpd/conf/httpd.conf DocumentRoot /var/www/html
|
||||
```
|
||||
|
||||
### Resources
|
||||
## Basic Configuration
|
||||
If you want to host multiple domains on a single server, you can configure Virtual Hosts in Apache.
|
||||
|
||||
#### Installation and Configurations Guides
|
||||
You can copy the `default.conf` and modify accordingly in the following directory:
|
||||
|
||||
#### On Ubuntu:
|
||||
```sh
|
||||
/etc/apache2/sites-enabled/
|
||||
```
|
||||
|
||||
#### On Centos:
|
||||
```sh
|
||||
/etc/httpd/sites-enabled/
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
### Installation and Configurations Guides
|
||||
- [Ubuntu](https://tutorials.ubuntu.com/tutorial/install-and-configure-apache#2)
|
||||
- [CentOS](https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-apache-config-ui.html)
|
||||
- [Arch Linux](https://wiki.archlinux.org/index.php/Apache_HTTP_Server)
|
||||
|
||||
#### Getting Started Guides
|
||||
### Getting Started Guides
|
||||
- [Getting Started with Apache HTTP Server Version 2.5](https://httpd.apache.org/docs/trunk/getting-started.html)
|
||||
|
|
|
@ -8,8 +8,7 @@ Any computer! PHP is very versatile and can run in many different environments.
|
|||
|
||||
### Manual Install:
|
||||
|
||||
**Windows**
|
||||
|
||||
#### Windows
|
||||
1. Download the zip from [windows.php.net/download](https://windows.php.net/download#php-7.2) and unzip it (ex `C:\PHP`)
|
||||
2. Add php to the windows PATH (for example append `;C:\PHP`)
|
||||
3. Copy and rename either `php.ini - development` or `php.ini - production` to `php.ini`
|
||||
|
@ -18,13 +17,13 @@ If you are using IIS for your webserver, this is a good resource:
|
|||
|
||||
- [Microsoft Docs - Windows installation and integration with IIS](https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php#12)
|
||||
|
||||
**Mac**
|
||||
#### MacOS
|
||||
_Type the commands in a terminal_
|
||||
1. Install homebrew `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
|
||||
2. Install php `brew install php`
|
||||
|
||||
**Linux**
|
||||
This varies a bit with each distro
|
||||
#### Linux
|
||||
This varies a bit with each distribution
|
||||
|
||||
- _debian/ubuntu_ `sudo apt-get install php -y`
|
||||
- _fedora/rhl/centos_ `dnf install php php-common`
|
||||
|
@ -35,10 +34,10 @@ There are many good resources for this, like:
|
|||
- [Digital Ocean - How to install the LEMP stack on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04)
|
||||
|
||||
### Install Bundles
|
||||
There are also several popular install bundles for PHP technology stacks which are multi platform.
|
||||
|
||||
There are also several popular install bundles for PHP technology stacks which are multi-platform.
|
||||
- [XAMPP Installer - Apache Server, MariaDB, PHP, and Perl](https://www.apachefriends.org/index.html) _window, linux, macOS_
|
||||
- [MAMP Webserver](https://www.mamp.info) _windows, macOS_
|
||||
- [WAMP Server](http://www.wampserver.com/en/) _windows_
|
||||
|
||||
### Find a webhost with free PHP services.
|
||||
It is [common](https://www.google.com/search?q=free+php+web+hosting) for free webhosting services to offer support for PHP.
|
||||
|
@ -46,7 +45,7 @@ It is [common](https://www.google.com/search?q=free+php+web+hosting) for free we
|
|||
## Once PHP is installed:
|
||||
If you installed PHP with a webserver, often a default route is set for `localhost/info.php` or `127.0.0.1/info.php`. If PHP has been integrated properly, it should display a description of the current PHP installation. If your server will be public, you should delete `info.php` as it contains private details about your installation, system.
|
||||
|
||||
If you did not install PHP with a webserver, several tools integrate well with the library for the ability to locally run, debug, host your PHP scripts and applications. [VS Code's](https://code.visualstudio.com/) extention [PHP Server](https://marketplace.visualstudio.com/items?itemName=brapifra.phpserver) allows your to develop and host locally.
|
||||
If you did not install PHP with a webserver, several tools integrate well with the library for the ability to locally run, debug, host your PHP scripts and applications. [VS Code's](https://code.visualstudio.com/) extension [PHP Server](https://marketplace.visualstudio.com/items?itemName=brapifra.phpserver) allows your to develop and host locally.
|
||||
|
||||
### Resources
|
||||
## Resources
|
||||
- The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php
|
||||
|
|
Loading…
Reference in New Issue