修改CSS后出现500个内部服务器错误

时间:2020-03-25 16:19:09

标签: laravel vue.js

我有一个使用laravel构建的网站,而Vuejs是新的,我昨天做过,我已经将他放在域中。 经过漫长的一天(战争),我发现谁正确上传了我的文件并修改了.htaccess以便正常工作。

但是我只有一点点更新css我的项目!

所以我在服务器上删除了我的网站并上传了新网站,但是现在我遇到了一个错误:)

所以在网站上我明白了:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

现在我的日志服务器错误是:

[Wed Mar 25 16:55:59 2020] [alert] [client 2a01:cb15:fe:8100:d6c:1aa0:83e3:13ca] [host www.mywebsite.com] /homez.964/rolletrade/www/.htaccess: </IfModule> without matching <IfModule> section

[Wed Mar 25 16:55:59 2020] [alert] [client 2a01:cb15:fe:8100:d6c:1aa0:83e3:13ca] [host www.mywebsite.com] /homez.964/rolletrade/www/.htaccess: </IfModule> without matching <IfModule> section

那么我在做什么?我有正确的所有步骤,所有时间都在工作,所以我做了同样的事,但是没有工作..

1:将所有项目拖放到filezilla主文件夹“ www”中 2:我进入myproject并将所有文件拖放到“ www”中的“ public”文件夹中 3 :(删除公共)现在,index.php编辑并修改两个lignes,并添加“ myproject” DIR __。'/ monProjet / vendor / autoload.php'; 4:完成

我对.htaccess进行了很多尝试,但是我没有找到:(

谢谢您的帮助,我有一个问题,也许是我在myproject / public中遇到的问题,在上传之前我没有.htacess。那么什么时候创建的?

我的首次代码是否有效(我完全一样) index.php

/*** Laravel - A PHP Framework For Web Artisans
*
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/myProject/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/myProject/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

.htaccess:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews -Indexes
</IfModule>

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] e</IfModule>

2 个答案:

答案 0 :(得分:0)

在您的www / .htaccess中,更改

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews -Indexes
</IfModule>

<IfModule mod_rewrite.c>
    Options -MultiViews -Indexes
</IfModule>

答案 1 :(得分:0)

所以我真的不知道我重试了一千次后发生了什么。

我只是将所有文件公开放置在main中,也将我的文件夹“ myProject”放置在main中。 像每次一样。但这是工作...所以我不知道要怎么做。

感谢帮助