Friday, March 17, 2017

I try to migrate my laravel application to new server.

Previously my apps running on /var/www/html/demo and on new server i put it on /var/www/html as root folder.

Everything work well, but when i try to running some function i got error message like below :

Failed to load resource: the server responded with a status of 404 (Not Found)
natagen.js:519 1

http://mydomaincom/api/publishers/7 Failed to load resource: the server responded with a status of 404 (Not Found)

On file natagen.js i have code like below :

var apiPath = function(resource_identifier){
            var baseUrl = $('.base-url').val();
            var baseApi = baseUrl + '/api/';

            return baseApi + resource_identifier;
    };

    /**
     * adPath
     * 
     * @return void
     **/
    var adPath = function(id){
            return apiPath('../app-data/ads/'+id+'/');
    };

I also cannot access http://mydomaincom/api/

Before i migrate to new server, natagen.js have code like below .

var apiPath = function(resource_identifier){
        var baseUrl = $('.base-url').val();
        var baseApi = baseUrl + '/api/';

        return baseApi + resource_identifier;
    };

    /**
     * adPath
     * 
     * @return void
     **/
    var adPath = function(id){
        return apiPath('../public/app-data/ads/'+id+'/');
    };

Any path shoud i change on laravel configuration if i change url/path directory ?



via user2967389

Advertisement