skip to Main Content

I can’t access my temporary URL, it just shows “Not Supported”. I uploaded laravel files. i’ve configured the index.php and .envshowing not supported

2

Answers


    1. If your web root is the syksxyz directory then the public path will be syksxyz/public

    2. To make sure its working you can add an index.html file in the public folder to see whether the mapping is correct before debugging the php part of it.

    Login or Signup to reply.
  1. Depending on what web server you are using, Apache or Nginx, you can follow official document to configure your web server. Web Server Configuration

    To use laravel, you must configure your server properly. Just uploading code to server will not make your website work as expect. The must important part of configuration is directing all requests to the index.php.

    And here is part of my config file of Nginx.

    server {
        listen 80;
        server_name my-website.test;
        root "/path/to/my-laravel-project/public";
    
        index index.html index.htm index.php;
    
        charset utf-8;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location ~ .php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    
        }
    
        location ~ /.ht {
            deny all;
        }
    }
    

    Remember that website root should point to ./laravel-project/public directory, because laravel-project/public/index.php file will handle all request for your website.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search