mardi 2 avril 2019

How to move existing web project into Laravel without changing the server hostname and route

As in the existing PHP project, there is lots of code. It'll cost some time to finish the work. So I need to keep both the project serving on the same server without change the existing API.

I config nginx like this, but it not works,both the request enter the existing_project.

    location ~ /biz_hq/edu/file/upload {
        root           /data/HQ/SC_Educations/hq_htdocs/existing_project/public;
        fastcgi_pass   unix:/dev/shm/phpcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
        limit_req zone=mylimit burst=10 nodelay;
    }

    location ~ /biz_hq/edu/file/delete {
        root           /data/HQ/SC_Educations/hq_htdocs/laravel_project/public;
        fastcgi_pass   unix:/dev/shm/phpcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
        limit_req zone=mylimit burst=10 nodelay;
    }




Aucun commentaire:

Enregistrer un commentaire