social icon indicating copy to clipboard operation
social copied to clipboard

Totally doesn't work

Open intervisionlord opened this issue 4 months ago • 4 comments

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 avatar Feb 29 '24 20:02 intervisionlord

Could you share your nginx conf?

Thatoo avatar Mar 01 '24 08:03 Thatoo

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;
}

intervisionlord avatar Mar 01 '24 09:03 intervisionlord

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;
  }

Thatoo avatar Mar 01 '24 09:03 Thatoo

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>

intervisionlord avatar Mar 01 '24 09:03 intervisionlord