[ Nextcloud ] Self-hosted productivity platform

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ Nextcloud ][ 23.0.2.0 ] Self-hosted productivity platform

Post by outkastm »

i have to test it myself.

have you tried already this in config.php ?

Code: Select all

'trusted_domains' => 
  array (
    0 => 'yourdomain.com',
  ),
  'trusted_proxies' => 
  array (
    0 => 'yourdomain.com',
  ),
  'overwrite.cli.url' => 'https://yourdomain.com',
  'overwriteprotocol' => 'https',
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [ Nextcloud ][ 23.0.2.0 ] Self-hosted productivity platform

Post by sanctimon »

I have in the config file:

Code: Select all

  'trusted_domains' =>
  array (
    0 => '192.168.*.***:31443',
    1 => '192.168.*.***:31000',
    2 => 'cloud.someone.***',
  ),
and

Code: Select all

 array (
    'trusted_proxies' => 'rev.proxy.ip.***', #the local network IP of the reverse proxy
    'overwritehost' => 'cloud.someone.***:443', #the web address
    'overwriteprotocol' => 'https',
    'overwritewebroot' => '/',
    'overwrite.cli.url' => 'https://localhost:31433/',
    'htaccess.RewriteBase' => '/',
  ),
  'forwarded_for_headers' => ['HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED'],
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [ Nextcloud ][ 23.0.2.0 ] Self-hosted productivity platform

Post by sanctimon »

I managed to resolve this by making a minor change to the Apache reverse proxy. I set:

Code: Select all

ProxyPreserveHost On
and restarted the Apache service.
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ Nextcloud ][ 23.0.2.0 ] Self-hosted productivity platform

Post by outkastm »

Perfect, I'm glad you fix it.
User avatar
super-6-1
Posts: 31
Joined: 11 Nov 2021, 05:30

Re: [ Nextcloud ][ 23.0.3.0 ] Self-hosted productivity platform

Post by super-6-1 »

Hey Outkastm thanks for the awesome work!

I feel like a idiot when it comes to this stuff, first time running all this.

Im getting a 403 error when i try to go threw the configuration. Is there a reason for this? I have apachy24 and DB already installed.
Attachments
Moduelview
Moduelview
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ Nextcloud ][ 23.0.3.0 ] Self-hosted productivity platform

Post by outkastm »

On which step are you getting 404 error? What path have you choosed to store the data? You can check the log files for apache24 and nextcloud after you get the 404 error
User avatar
super-6-1
Posts: 31
Joined: 11 Nov 2021, 05:30

Re: [ Nextcloud ][ 23.0.3.0 ] Self-hosted productivity platform

Post by super-6-1 »

outkastm wrote: 28 Mar 2022, 04:34 On which step are you getting 404 error? What path have you choosed to store the data? You can check the log files for apache24 and nextcloud after you get the 404 error
Sorry i ment 403 Forbidden error.

in the access log this is what im getting.

192.168.1.xx - - [27/Mar/2022:13:16:32 -0400] "GET /favicon.ico HTTP/1.1" 403 199
192.168.1.xx - - [27/Mar/2022:13:16:37 -0400] "GET / HTTP/1.1" 403 199

for error logs im getting this.

Code: Select all

[Sun Mar 27 12:56:45.114167 2022] [ssl:warn] [pid 8601] AH01906: www.example.com:31443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Mar 27 12:56:45.114306 2022] [ssl:warn] [pid 8601] AH01909: www.example.com:31443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 27 12:56:45.287137 2022] [ssl:warn] [pid 8602] AH01906: www.example.com:31443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Mar 27 12:56:45.287176 2022] [ssl:warn] [pid 8602] AH01909: www.example.com:31443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 27 12:56:45.918055 2022] [mpm_prefork:notice] [pid 8602] AH00163: Apache/2.4.51 (Unix) OpenSSL/1.1.1i PHP/7.4.26 configured -- resuming normal operations
[Sun Mar 27 12:56:45.918131 2022] [core:notice] [pid 8602] AH00094: Command line: '/usr/local/apache24/sys/bin/httpd -f /mnt/appdata/MOD_CONFIG/Nextcloud_okm/httpd.conf'
[Sun Mar 27 12:57:43.750916 2022] [authz_core:error] [pid 8605] [client 192.168.1.90:61996] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:8181/
[Sun Mar 27 12:57:43.955547 2022] [authz_core:error] [pid 8605] [client 192.168.1.90:61996] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:31000/
[Sun Mar 27 12:57:51.535673 2022] [authz_core:error] [pid 8608] [client 192.168.1.90:62000] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:8181/
[Sun Mar 27 12:57:51.726481 2022] [authz_core:error] [pid 8608] [client 192.168.1.90:62000] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: https://192.168.1.51:31443/
[Sun Mar 27 12:59:32.643498 2022] [authz_core:error] [pid 8607] [client 192.168.1.90:62026] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:8181/
[Sun Mar 27 12:59:32.818339 2022] [authz_core:error] [pid 8607] [client 192.168.1.90:62026] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:31000/
[Sun Mar 27 13:00:53.185542 2022] [authz_core:error] [pid 8604] [client 192.168.1.90:62062] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:8181/
[Sun Mar 27 13:00:53.370887 2022] [authz_core:error] [pid 8604] [client 192.168.1.90:62062] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: https://192.168.1.51:31443/
[Sun Mar 27 13:01:00.216023 2022] [authz_core:error] [pid 8605] [client 192.168.1.90:62063] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:8181/
[Sun Mar 27 13:01:00.396950 2022] [authz_core:error] [pid 8605] [client 192.168.1.90:62063] AH01630: client denied by server configuration: /usr/local/Nextcloud_okm/bin/nextcloud, referer: http://192.168.1.51:31000/
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ Nextcloud ][ 23.0.3.0 ] Self-hosted productivity platform

Post by outkastm »

have you somehow edited the file httpd.conf ?

From WebUI go to Configuration Files >> Edit httpd.conf and send me the section below

Code: Select all


# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/Nextcloud_okm/bin/nextcloud"
<Directory "/usr/local/Nextcloud_okm/bin/nextcloud">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymlinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All
 <IfModule mod_dav.c>
  Dav off
 </IfModule>

    #
    # Controls who can get stuff from this server.
    #
	Require all granted

	SetEnv HOME /usr/local/Nextcloud_okm/bin/nextcloud
    SetEnv HTTP_HOME /usr/local/Nextcloud_okm/bin/nextcloud


</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>



I've tried a clean install of the app and i can access the setup page without issues
User avatar
super-6-1
Posts: 31
Joined: 11 Nov 2021, 05:30

Re: [ Nextcloud ][ 23.0.3.0 ] Self-hosted productivity platform

Post by super-6-1 »

I figured it out. All I had to do was Uninstall and reinstall nextcloud and it was fixed. I am curious what the steps are to access nextcloud online rather then Lan. I'll look into this later. Thank you for your work!


outkastm wrote: 28 Mar 2022, 08:16 have you somehow edited the file httpd.conf ?

From WebUI go to Configuration Files >> Edit httpd.conf and send me the section below

Code: Select all


# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/Nextcloud_okm/bin/nextcloud"
<Directory "/usr/local/Nextcloud_okm/bin/nextcloud">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymlinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All
 <IfModule mod_dav.c>
  Dav off
 </IfModule>

    #
    # Controls who can get stuff from this server.
    #
	Require all granted

	SetEnv HOME /usr/local/Nextcloud_okm/bin/nextcloud
    SetEnv HTTP_HOME /usr/local/Nextcloud_okm/bin/nextcloud


</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>



I've tried a clean install of the app and i can access the setup page without issues
Post Reply