debian配置apache+php环境

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容