分类 系统搭建 下的文章

在/opt/lampp/etc/extra下 httpd-ssl.conf 文件

ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/opt/lampp/htdocs/Public"
ServerName xxx.com
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile /opt/lampp/cert/public.pem
# 证书私钥配置
SSLCertificateKeyFile /opt/lampp/cert/214************.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile /opt/lampp/cert/chain.pem

1.下载xampp.run

/opt/lampp/lampp start 

/opt/lampp/lampp security 

<Directory "D:/xampp/phpmyadmin">
    AllowOverride AuthConfig
    Require all granted
</Directory>

vi /opt/lampp/etc/httpd.conf
vi /opt/lampp/etc/extra/httpd-vhosts.conf
vi /opt/lampp/etc/php.ini

Mysql远程连接
vi my.cnf 
skip-network

1.Mac卸载XAMPP

sudo rm -rf /Applications/xampp

2.安装XAMPP

下载地址:https://www.apachefriends.org/download.html

3.安装

按步骤安装,傻瓜式

4.配置host

sudo vi /private/etc/hosts

在末尾设置域名重定向

5.配置Apache

sudo vi /Applications/XAMPP/etc/httpd.conf
搜索 “Virtual hosts”
#Virtual hosts  
#Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf  

6.设置host

sudo vi /Applications/XAMPP/etc/extra/httpd-vhosts.conf  

复杂一段出来就可以了

7.出现403无权限访问(用以下三点)

(1).在httpd.conf里面搜索User daemon,把daemon改成OS的用户名,重启Apache,就可以了。

(2).配置文件httpd.conf 里面 看看
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
deny from all
Satisfy all
</Directory>
把deny from all 改成allow from all

(3).在httpd.conf末尾加上
<Directory "/Users/houtouke/Desktop/PHP">
        #Options Indexes FollowSymLinks ExecCGI Includes #don't permission see list
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>