Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Totally doesn't work #1882

Open
intervisionlord opened this issue Feb 29, 2024 · 4 comments
Open

Totally doesn't work #1882

intervisionlord opened this issue Feb 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@intervisionlord
Copy link

Describe the bug
App is broken

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'home'
  2. See error '.well-known/webfinger isn't properly set up! '

--

  1. Try to make any post
  2. See error 'Failed to create a status'

--

  1. Try to follow smb.
  2. See error 'authorize_interaction not found'

Expected behavior
All declared features should be working

Client details:

  • OS: Windows 11
  • Browser Firefox
  • Version 122.0.1
  • Device: Desktop
Server details **Social app version:** 0.6.1

Operating system:
Debian 9

Web server:
Server version: Apache/2.4.25 (Debian)
Server built: 2022-03-18T12:54:25
nginx version: nginx/1.20.2

Database:
Ver 15.1 Distrib 10.2.29-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version:
PHP 8.2.0
Zend Engine v4.2.0
with Zend OPcache v8.2.0

Nextcloud version: (see Nextcloud admin page)
28.0.3

@intervisionlord intervisionlord added the bug Something isn't working label Feb 29, 2024
@Thatoo
Copy link

Thatoo commented Mar 1, 2024

Could you share your nginx conf?

@intervisionlord
Copy link
Author

server {
	server_name domain.tld www.domain.tld;
	charset UTF-8;
	index index.html index.htm index.php;
	disable_symlinks if_not_owner from=$root_path;
	include /etc/nginx/vhosts-includes/*.conf;
	include /etc/nginx/vhosts-resources/domain.tld/*.conf;
	access_log /var/www/httpd-logs/domain.tld.access.log;
	error_log /var/www/httpd-logs/domain.tld.error.log notice;
	ssi on;
	return 301 https://$host:443$request_uri;
	set $root_path /var/www/username/data/www/domain.tld;
	root $root_path;
	gzip on;
	gzip_comp_level 5;
	gzip_disable "msie6";
	gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
	location / {
		location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
			expires 8h;
			try_files $uri $uri/ @fallback;
		}
    
		location ~ [^/]\.ph(p\d*|tml)$ {
			try_files /does_not_exists @fallback;
		}
		location / {
			try_files /does_not_exists @fallback;
		}
	}
	location @fallback {
		proxy_pass http://127.0.0.1:8080;
		proxy_redirect http://127.0.0.1:8080 /;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Port $server_port;
		access_log off;
	}
	listen EXT.IP.ADRESS:80;
}
server {
	server_name domain.tld www.domain.tld;
	ssl_certificate "/var/www/httpd-cert/username/domain.tld_le1.crtca";
	ssl_certificate_key "/var/www/httpd-cert/username/domain.tld_le1.key";
	ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
	ssl_prefer_server_ciphers on;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	add_header Strict-Transport-Security "max-age=31536000;";
	ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
	charset UTF-8;
	index index.html index.htm index.php;
	disable_symlinks if_not_owner from=$root_path;
	include /etc/nginx/vhosts-includes/*.conf;
	include /etc/nginx/vhosts-resources/domain.tld/*.conf;
	access_log /var/www/httpd-logs/domain.tld.access.log;
	error_log /var/www/httpd-logs/domain.tld.error.log notice;
	ssi on;
	set $root_path /var/www/username/data/www/domain.tld;
	root $root_path;
	gzip on;
	gzip_comp_level 5;
	gzip_disable "msie6";
	gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
	
    location ^~ /.well-known {
        # The following 6 rules are borrowed from `.htaccess`

        location = /.well-known/carddav     { return 301 /remote.php/dav/; }
        location = /.well-known/caldav      { return 301 /remote.php/dav/; }
        # Anything else is dynamically handled by Nextcloud
        location ^~ /.well-known            { return 301 /index.php$uri; }

        try_files $uri $uri/ =404;
    }
	
	location / {
		location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
			expires 8h;
			try_files $uri $uri/ @fallback;
		}
		location ~ [^/]\.ph(p\d*|tml)$ {
			try_files /does_not_exists @fallback;
		}
		client_max_body_size 10G; # NextCloud Upload Restrictions
		location / {
			try_files /does_not_exists @fallback;
		}
	}
	location @fallback {
		proxy_pass http://127.0.0.1:8080;
		proxy_redirect http://127.0.0.1:8080 /;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Port $server_port;
		access_log off;
	}
	listen EXT.IP.ADRESS:443 ssl http2;
}

@Thatoo
Copy link

Thatoo commented Mar 1, 2024

Nginx is used as a reverse proxy, and your server is apache?
I don't know much about apache but if you want someone to help you, you better share your apache conf too.

By the way, in my nginx conf (used as server, not reverse proxy), I added this lines to make webfinger work with social 0.6.1 app work :

  location ~ / {
    if ($request_method ~ ^(PUT|DELETE|PATCH|PROPFIND|PROPPATCH)$) {
        rewrite ^ /index.php$request_uri last;
    }
    try_files $uri /index.php$request_uri;
  }

@intervisionlord
Copy link
Author

Nginx is used as a reverse proxy, and your server is apache? I don't know much about apache but if you want someone to help you, you better share your apache conf too.

By the way, in my nginx conf (used as server, not reverse proxy), I added this lines to make webfinger work with social 0.6.1 app work :

  location ~ / {
    if ($request_method ~ ^(PUT|DELETE|PATCH|PROPFIND|PROPPATCH)$) {
        rewrite ^ /index.php$request_uri last;
    }
    try_files $uri /index.php$request_uri;
  }

Nginx used for static files as a frontend. Dynamic content (like php scripts) is served by apache (with mpm-itk)
Here its config

<VirtualHost 127.0.0.1:8080>
	ServerName domain.tld
	DocumentRoot /var/www/username/data/www/domain.tld
	ServerAdmin [email protected]
	AddDefaultCharset UTF-8
	AssignUserID username username
	CustomLog /var/www/httpd-logs/domain.tld.access.log combined
	ErrorLog /var/www/httpd-logs/domain.tld.error.log
	<FilesMatch "\.ph(p[3-5]?|tml)$">
		SetHandler application/x-httpd-php
	</FilesMatch>
	SetEnvIf X-Forwarded-Proto https HTTPS=on
	ServerAlias www.domain.tld
	DirectoryIndex index.html index.htm index.php
	<FilesMatch "\.phps$">
		SetHandler application/x-httpd-php-source
	</FilesMatch>
	<IfModule php5_module>
		php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f [email protected]"
		php_admin_value upload_tmp_dir "/var/www/username/data/mod-tmp"
		php_admin_value session.save_path "/var/www/username/data/mod-tmp"
		php_admin_value open_basedir "/var/www/username/data:."
	</IfModule>
	<IfModule php7_module>
		php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f [email protected]"
		php_admin_value upload_tmp_dir "/var/www/username/data/mod-tmp"
		php_admin_value session.save_path "/var/www/username/data/mod-tmp"
		php_admin_value open_basedir "/var/www/username/data:."
	</IfModule>
	<IfModule php_module>
		php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f [email protected]"
		php_admin_value upload_tmp_dir "/var/www/username/data/mod-tmp"
		php_admin_value session.save_path "/var/www/username/data/mod-tmp"
		php_admin_value open_basedir "/var/www/username/data:."
	</IfModule>
</VirtualHost>
<Directory /var/www/username/data/www/domain.tld>
	Options +Includes -ExecCGI
	<IfModule php5_module>
		php_admin_flag engine on
	</IfModule>
	<IfModule php7_module>
		php_admin_flag engine on
	</IfModule>
	<IfModule php_module>
		php_admin_flag engine on
	</IfModule>
</Directory>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants