安装PHP

Posted bear159412

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装PHP相关的知识,希望对你有一定的参考价值。

wampmanager  (php

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn‘t need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option ‘-S‘ to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 1807
<VirtualHost *:1807>
ServerName localhost
DocumentRoot D:/H5-1807
<Directory "D:/H5-1807">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


listen 1809
<VirtualHost *:1809>
ServerName localhost
DocumentRoot D:/H5-1809
<Directory "D:/H5-1809">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 1811
<VirtualHost *:1811>
ServerName localhost
DocumentRoot D:/H5-1811
<Directory "D:/H5-1811">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 1812
<VirtualHost *:1812>
ServerName localhost
DocumentRoot D:/H5-1812
<Directory "D:/H5-1812">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


listen 3000
<VirtualHost *:3000>
ServerName localhost
DocumentRoot D:\Repositories\blog\blog\wordpress
<Directory "D:\Repositories\blog\blog\wordpress">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 5000
<VirtualHost *:5000>
ServerName localhost
DocumentRoot D:\Repositories\blog\wordpress
<Directory "D:\Repositories\blog\wordpress">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 1903
<VirtualHost *:1903>
ServerName localhost
DocumentRoot D:\H5-1903\code
<Directory "D:\H5-1903\code">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
#Require local
Require all granted
</Directory>
</VirtualHost>

listen 1902
<VirtualHost *:1902>
ServerName localhost
DocumentRoot D:\H5-1902\code
<Directory "D:\H5-1902\code">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
#Require local
Require all granted
</Directory>
</VirtualHost>

listen 1904
<VirtualHost *:1904>
ServerName localhost
DocumentRoot D:\H5-1902\code
<Directory "D:\H5-1902\code">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
#Require local
Require all granted
</Directory>
</VirtualHost>

listen 8880
<VirtualHost *:8880>
ServerName localhost
DocumentRoot C:\mogujie
<Directory "C:\mogujie">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

listen 1905
<VirtualHost *:1905>
ServerName localhost
DocumentRoot D:\H5-1905\code
<Directory "D:\H5-1905\code">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
#Require local
Require all granted
</Directory>
</VirtualHost>

 

 

 

马琳代码安装PHP

 

 

wamp 配置多站点
1、在httpd.conf文件 取消下面这一行的注释 即 # 号
Include conf/extra/httpd-vhosts.conf
2、在httpd.conf文件 找到下面
<Directory />
AllowOverride All
Require all denied # 把denied改为 granted
</Directory>

3、 在httpd.conf文件 如果此处不一样 请改为如下
<Directory "D:/app/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
Order Deny,Allow
Allow from all
</Directory>

*注:上面内容的注释被我删了

4、在httpd-vhosts.conf 文件中添加

Listen 1811 # 此为监听端口号
<VirtualHost *:1811>
DocumentRoot C:/Users/Administrator/Desktop/demo/html # 此目录为站点目录
ServerName www.liting.com
<Directory "C:/Users/Administrator/Desktop/demo/html"> # 此目录为站点目录
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

 

以上是关于安装PHP的主要内容,如果未能解决你的问题,请参考以下文章

php 怎么安装扩展

安装PHP5与安装PHP7

指定版本安装php(删除默认的php5.3,安装php5.6)

Docker 编译安装php7.3

如何编译安装PHP扩展

如何安装php的扩展bcmath