wordpress AWS问题:请求的URL在此服务器上未找到

cvxl0en2  于 11个月前  发布在  WordPress
关注(0)|答案(4)|浏览(130)

这是我第一次使用AWS,并成功创建了一个示例:
x1c 0d1x的数据
该示例是托管WordPress安装,我通过PuTTY安装WordPress并修改了配置文件。


AWS示例正在运行,但为什么会出现以下问题:1.当我输入与WordPress示例关联的IP(弹性IP)时,浏览器给我错误:
无法找到请求的页面“/

1.如何通过FTP连接到服务器?

a14dhokn

a14dhokn1#

你只需要允许

sudo vim /etc/httpd/conf/httpd.conf

字符串
找到以开头的部分。

<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>


将上一节中的“允许无”行更改为“允许全部..

sudo reboot


现在再次登录,如果您已经安装了mariadb,请不要忘记再次启动mariadb。

sudo systemctl start mariadb


我知道我回答得太晚了,但这也是我一段时间前的问题,当我第一次开始使用AWS时,

4urapxun

4urapxun2#

我发现了问题所在:所有我需要做的是将完成的WP文件夹移动到/var/www/html,因为这是网站所在的位置。虽然安装主题仍然存在问题,但这超出了这个问题的范围,感谢您的观看和回复。

fwzugrvs

fwzugrvs3#

编辑public/.htaccess并更改:
例如:vi /var/www/html/yourprojdir/.htaccess

# if in web root
# RewriteRule ^(.*)$ index.php?/$1 [L]

# if in subdir comment above line, uncomment below one and replace <OSPOS path> with your path
RewriteRule ^(.*)$ /opensourcepos/public/index.php?/$1 [L]

sudo a2enmod rewrite

sudo systemctrl restart apache2

字符串

soat7uwm

soat7uwm4#

打开虚拟主机文件,例如:

sudo vim /etc/httpd/conf.d/mysite.conf

字符串
您的“<Directory“/var/www/html”>“需要看起来像这样:

<Directory /var/www/html>
  Options FollowSymLinks
  AllowOverride All
  Order Allow,Deny
  Allow from all
</Directory>

相关问题