Hi Guys,
I installed the latest version of Dreamfactory from github on my ubuntu desktop server 14.04 LTS with an nginx server.
I pointed the root of my nginx server to the public folder of my dreamfactory installation. But here is the thing. If i perform an “artisan serve php” command, i can run my dreamfactory instance but if i run from just localhost i get a blank page. I have checked the dreamfactory.log, nginx error.log, laravel.log and php5-fpm log and there is not any error, its just empty and indicates no evidence of a wrong setup or any mistake. But the confusing part is that if i change the root folder from dreamfactory to any website (default nginx rot or any other html website), if i run localhost, i am able to get any of the websites. Please what can i be doing wrong?
I will check. But i did follow the instructions properly and at time even had to give 777 permission to the directory using chmod -R 777 on the storage/ and bootstrap/cache/ directories.
Now, i will check the browser console while browsing to localhost for dreamfactory and report whatever and all i see there as response.
I followed Drew’s instruction and checked my browser console and this is the response i have on the browser console.
“Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ app.ee90cd63.js:3:13186
GET XHR http://localhost/api/v2/system/environment [HTTP/1.1 404 Not Found 0ms]
uncaught exception: [object Object]”
I dont know what this means, please can anyone save my nginx dreamfactory soul??
I think this is the key issue. Did you use the example nginx config file on the DreamFactory wiki? It has some configuration that is not included in nginx by default.
Hi Drew,
I have not heard from you since the last time. Please any update on the situation i complained about the last time. In my previous post i have responded with my actual nginx configuration.
I’m really uncertain regarding this issue, and if anyone else would like to jump in and help troubleshoot I’d welcome it.
Can you do the following? ls -la /opt/cedf2/
and report back the results.
Additionally, you may want to edit you /opt/cedf2/.env file and change/add DF_LOG_LEVEL=DEBUG
and APP_DEBUG=true
and APP_ENV=local
You’ll need to restart nginx after these changes. You should see a lot more helpful information in the DreamFactory log at this point.
I have deleted installation and tried other directories, imported again from github repositories, its just the same all over. Do i reformat the system?
I get the same thing on a new install of a DO droplet ubuntu 14.04 and a manual vanilla install of LEMP
Have permissions set to 777 on all folders and files
Browser Error Chrome
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
http://lempdreamfactory.myserver.org/myserver/dist/scripts/app.a66ba06d.js Failed to load resource: the server responded with a status of 404 (Not Found)b @ app.a66ba06d.js:3
app.a66ba06d.js:3 Uncaught
Nginx default config
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/mydir/dreamfactory/public;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name lempdreamfactory.myserver.org;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/java$
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Also the index.php page gets redirected to http://lempdreamfactory.myserver.org/dreamfactory/dist/index.html
Sorry i have not gotten back on the status of my challenge on this thread. I have since re-installed DF on 2 different Ubuntu server setups in the last 1 week. And i also had to re-install ubuntu again on the server i used to have the problem.
But here a few lessons,
i am certain the version of DF at that time v2.0.1 had a lot to do with the issues around configuration with nginx.
it would be very safe to purge apache2 completely from the server in order to make it work. Although i am not sure but i think that saved me when re-installing the servers that worked.
ensure that mongodb’s installation had no errors (whatsoever) during its installation. And make wure you follow the dreamfactory wiki page on mongodb installation using the correct instruction for the correct version of DF https://wiki.dreamfactory.com/DreamFactory/Installation/Databases/MongoDB.
@delebash, are you sure this entry “gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/java$” in your nginx configuration is correct? I doubt its correct if its the way its quoted from your configuration file.
Also, try do remove the DF and use nginx default landing page (html page) as root. If that works, then
goind forward it would be advisable to run all your nginx setup, DF setup and all other dependencies as root.
i will implore you to alo use /var/www/ or /opt/ (especially /var/www/) as your installation directories instead of your home directory.
Thanks for the catch on the gzip it was a copy from the nginx config on dreamfactories website but the copy must have messed up
I don’t have apache installed this is a new Lemp stack
I am not installing mongo-db aws rackspace so I removed them from the composer config
I Installed the latest dreamfactory from git using the git command listed on dreamfactories wiki site
I originally used /opt. I just used the user directory on this last attempt to see if it made a difference.
Also I originally added this to my VestaCP(just a web control panel with default Lemp stack) Nginx was installed and already had php-fpm configured correctly.
However the last two attempts were on a clean Lemp build non VestaCP
I am trying a new Lemp stack with corrected gzip and /opt directory and will let you know.