这是我第一次使用AWS并成功创建了一个实例:
实例是托管wordpress安装,我通过PuTTY安装了wordpress并修改了配置文件。
AWS实例正在运行,但为什么会出现以下问题: 1.当我输入与wordpress实例相关的IP(弹性IP)时,浏览器会给我错误:
答案 0 :(得分:1)
您只需要允许AllowOverride
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>
更改上一节中的AllowOverride None行以阅读AllowOverride All。 .. 并重新启动服务器
sudo reboot
现在再次登录,如果安装了,请不要忘记再次启动mariadb。
sudo systemctl start mariadb
我知道我回答的时间太晚了但是那段时间我第一次开始使用aws时也是我的问题
答案 1 :(得分:0)
我想出了这个问题:我需要做的就是将已完成的wp文件夹移动到/ var / www / html,因为这就是网站所在的位置。虽然安装主题仍有问题,但这超出了这个范围。问题的范围,感谢您观看和回复。
答案 2 :(得分:0)
编辑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