当我创建一个网络服务器时,它工作正常,但现在当我访问我的网站时,显示的不是网站
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
答案1
您看到的是 index.php 的文本,而不是正在运行它,因为 apache 未运行。请尝试
sudo systemctl restart apache2.service
可以找到有关运行 apache 的更多文档这里。