502 bad gateway error trying to access owncloud on subdomain

I am very much a newby and learning as I go. I have reformatted a computer to Ubuntu 20 server and installed Joomla with NGINX. I am trying to setup owncloud as a subdoamin and have gotten past a couple errors but now I am getting 502 gateway error an I am lost on what to do. Please help me know what you need to see to help me get this working.

Please excuse my ignorance but if you want to see a config file please tell me exactly where and what file you need to see.

Hello @John_Jones,

please show us your nginx config file for your owncloud and also the ngnix logs.

Regards

Michael

1 Like

nginx.conf

user www-data;
worker_processes 1;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/conf-enabled/.conf;
include /etc/nginx/sites-enabled/
.conf;
}

error.log
2020/10/07 02:44:44 [error] 13491#13491: *96248 FastCGI sent in stderr: “PHP message: PHP Warning: escapeshellcmd() has been disabled for security reasons in /var/www/html/libraries/vendor/phpmailer/phpmailer/class.phpmailer.php on line 1447” while reading response header from upstream, client: 92.204.171.210, server: _, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9999”, host: “174.52.93.75”
2020/10/07 04:09:11 [error] 13491#13491: *98088 open() “/var/www/html/solr/admin/info/system” failed (2: No such file or directory), client: 176.113.115.214, server: _, request: “GET /solr/admin/info/system?wt=json HTTP/1.1”, host: “174.52.93.75”, referrer: “ttp://174.52.93.75:80/solr/admin/info/system?wt=json”
2020/10/07 04:47:52 [error] 13491#13491: *98899 open() “/var/www/html/owa/auth/logon.aspx” failed (2: No such file or directory), client: 192.241.237.109, server: _, request: “GET /owa/auth/logon.aspx?url=https%3a%2f%2f1%2fecp%2f HTTP/1.1”, host: “174.52.93.75”
2020/10/07 06:09:20 [error] 13491#13491: *100569 open() “/var/www/html/api/jsonws/invoke” failed (2: No such file or directory), client: 176.113.115.214, server: _, request: “GET /api/jsonws/invoke HTTP/1.1”, host: “174.52.93.75”, referrer: “ttp://174.52.93.75:80/api/jsonws/invoke”
2020/10/07 09:08:00 [error] 13491#13491: *104228 FastCGI sent in stderr: “PHP message: PHP Warning: escapeshellcmd() has been disabled for security reasons in /var/www/html/libraries/vendor/phpmailer/phpmailer/class.phpmailer.php on line 1447” while reading response header from upstream, client: 128.14.134.170, server: _, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9999”, host: “174.52.93.75”
2020/10/07 10:03:35 [error] 13491#13491: *105366 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php (No such file or directory)” while reading response header from upstream, client: 176.113.115.214, server: _, request: “GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9999”, host: “174.52.93.75”, referrer: “ttp://174.52.93.75:80/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php”
2020/10/07 11:01:44 [error] 13491#13491: *106557 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php (No such file or directory)” while reading response header from upstream, client: 176.113.115.214, server: _, request: “GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9999”, host: “174.52.93.75”, referrer: “ttp://174.52.93.75:80/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php”
2020/10/07 15:32:40 [crit] 13491#13491: *112121 connect() to unix:/etc/nginx/sockets/domain.socket failed (2: No such file or directory) while connecting to upstream, client: 174.52.93.75, server: cloud.xxx.xx, request: “GET /index.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/nginx/sockets/domain.socket:”, host: “cloud.xxx.xx”, referrer: “ttps://cloud.eternallyjones.us/”
2020/10/07 15:32:40 [crit] 13491#13491: *112121 connect() to unix:/etc/nginx/sockets/domain.socket failed (2: No such file or directory) while connecting to upstream, client: 174.52.93.75, server: cloud.xxx.xx, request: “GET /favicon.ico HTTP/1.1”, upstream: “fastcgi://unix:/etc/nginx/sockets/domain.socket:”, host: “cloud.xxx.xx”, referrer: “ttps://cloud.eternallyjones.us/index.php”

I know that some of the links look funny, I had to edit the file enough that it did not have links so it would post.

I have noticed that my nginx.conf file is small compared to what many are posting but I have also noticed that much of that configuration is in the sites available files.

Here is the sites available for my cloud subdomain

server {
listen 80;
listen [::]:80 default_server;
listen 443;
listen [::]:443 ssl http2;

    root /var/www/owncloud;
    index index.html index.htm index.php;

    server_name cloud.eternallyjones.us;

    location / {
            try_files $uri $uri/ /index.php ;
    }
    location ~ \.php {
        include fastcgi_params;
        fastcgi_pass  unix:/etc/nginx/sockets/domain.socket;
   }

}

Hey,

this issue looks to me more like a nginx configuration problem rather then a problem of ownCloud. Maybe this is also the reason why you have not received much answers from other ownCloud users :-/

Maybe there is some sort of forum or mailing list for nginx configuration help which you could ask for help?

It also looks like you have a nginx configuration matching not what is required for ownCloud, maybe using the correct configuration already helps?

1 Like