发布于2022年10月15日2年前 一、运行镜像 docker run -d -p 80:80 --privileged=true --name httpd --link mysql5.7 -v C:\docker\www:/var/www/html -v C:\docker\apache\conf:/usr/local/apache2/conf -v C:\docker\php7.2\conf:/usr/local/etc/php/conf.d --restart=always php:7.2-apache 二、配置站点 <VirtualHost *:80> ServerName localhost DocumentRoot /var/www/html <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] RewriteRule !(^/static|\.(gif|swf|exe|png|jpg|js|css)$) /index.php [L] ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
创建帐户或登录后发表意见