美文网首页
debian配置apache+php环境

debian配置apache+php环境

作者: Bteam_独孤求败 | 来源:发表于2016-09-01 08:09 被阅读0次

1、apt-get install apahce2

2、apt-get install php5 php-pear php5-mysql

3、打开apache 重写:a2enmod rewrite

ServerName localhost

解决ubuntu下mysql不能远程连接数据库的问题

查看/etc/mysql/my.cnf找到bind-address才发现配置的是 127.0.0.1(bind-address=127.0.0.1),直接改为bind-address=192.168.0.xxx(本机ip),然 后再查看3306端口打开了,ok,可以正常连接了

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian

ServerName 119.28.15.253

ServerAlias *.abc.com

ServerAdmin webmaster@localhost

DocumentRoot /home/wwwroot/dialogSoft

Options FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all

#Alias /datacenter  "/home/wwwroot/dataCenter/"

Options FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride All

Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

Order allow,deny

Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,

# alert, emerg.

LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

相关文章

网友评论

      本文标题:debian配置apache+php环境

      本文链接:https://www.haomeiwen.com/subject/bkycettx.html