简体   繁体   English

WordPress禁止403错误

[英]wordpress forbidden 403 error

After installing wordpress and following all the steps when I am go to http://localhost , I am gettong 403 Forbidden error . 在安装wordpress并按照所有步骤操作后,进入http://localhost ,我遇到了tong403 403 Forbidden error

How can I resolve this? 我该如何解决?

Ubuntu 14.04 is my OS. Ubuntu 14.04是我的操作系统。

In normal case changing permission and updating .htaccess should fix this issue, but in your case it is not working, so try to create a host entry and see if it is working. 在正常情况下,更改权限和更新.htaccess应该可以解决此问题,但是在您的情况下,它不起作用,因此请尝试创建主机条目,然后查看它是否起作用。 Else it will be related to the server configuration. 否则,它将与服务器配置有关。

a. 一种。 Create a new folder inside /var/www (example: wordpress - with proper permissions) /var/www内部创建一个新文件夹(例如:wordpress-具有适当的权限)

b. b。 Copy all files from /var/www/html folder to /var/www/wordpress 将所有文件从/var/www/html文件夹复制到/var/www/wordpress

c. C。 Create a virtual host entry: sudo gedit /etc/apache2/sites-available/wordpress.conf 创建一个虚拟主机条目: sudo gedit /etc/apache2/sites-available/wordpress.conf

Add following contents: 添加以下内容:

<VirtualHost *:80>
    ServerName wordpress
    DocumentRoot /var/www/wordpress
    <Directory /var/www/wordpress>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

d. d。 Update hosts: sudo gedit /etc/hosts 更新主机: sudo gedit /etc/hosts

Add new line: 127.0.1.1 wordpress 添加新行: 127.0.1.1 wordpress

e. e。 Activate new website: sudo a2ensite wordpress.conf 激活新网站: sudo a2ensite wordpress.conf

d. d。 Restart apache: sudo service apache2 restart 重新启动apache: sudo service apache2 restart

Access http://wordpress from your web browser. 从网络浏览器访问http:// wordpress

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM