LAMP堆栈(ubuntu1804)无法从XAMPP(窗口10)执行源Web

问题描述 投票:0回答:1

我设置了一个完整的LAMP,使用load phpinfo()测试,它可以很好地工作。但是当我将源Web从XAMPP(htdocs / news)复制到/ var / www /时。然后我在Apache2配置中创建了一个新虚拟主机,名称为news.conf,并启用了该站点(a2ensite news.conf),我已经将数据库导入到MySQL中了。但是,它似乎无法显示该网站(请参阅我的附件)。有人可以给我一些建议吗?ps:我正在使用Ubuntu 18.04 bionic,以及php7.2,PHP

运行时出现的错误屏幕:

“错误屏幕”

我的配置如下:

Apache2虚拟主机

<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/news
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

/etc/apache2/apache2.conf
DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
	Options FollowSymLinks
	AllowOverride All
	Require all denied
</Directory>
<Directory /usr/share>
	AllowOverride All
	Require all granted
</Directory>
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
php ubuntu xampp apache2 lamp
1个回答
0
投票
  • 确保服务器可以读写文件(例如:如果您的源代码是laravel,则在存储文件夹中)
  • 检查主机文件(/ etc / hosts)
  • 读取apache日志文件。
© www.soinside.com 2019 - 2024. All rights reserved.