Page 1 of 1

[SOLVED] wiki.js problem

Posted: Mon Aug 27, 2018 9:32 pm
by Raveparty
#EDIT

[SOLVED]

Thanks to this thread:

viewtopic.php?t=5295

I figured out what I did wrong.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hello fellow reader,

im kinda sorry if the title is misleading but I got an strange problem with wiki.js.

Here is the official site from wiki.js: https://wiki.js.org/

I found it by accident and wanted to test it so I downloaded all the requirements and installed it onto my server.

When I try it on my server it just returns an 403 error. When I did an simple .html or .php the webserver works like intended.

When I connect with the port behind the domain it also works without any errors so im kinda confused.

Im using the port 3001 for wiki.js.

Im using:

Ubuntu 16.04

Apache2
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03

Nginx
nginx version: nginx/1.15.2

After it didnt work I tried to modify some files here: /home/admin/conf/web

wiki.domain.com.apache2.conf

Code: Select all

<VirtualHost *:8080> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName wiki.domain.com
  ProxyPass / http://_my_ip_address_:3001/
  ProxyPassReverse / http://_my_ip_address_:3001/
</VirtualHost>
wiki.domain.com.apache2.ssl.conf

Code: Select all

<VirtualHost *:8443> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName wiki.domain.com
  ProxyPass / http://_my_ip_address_:3001/
  ProxyPassReverse / http://_my_ip_address_:3001/
  
    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile /home/admin/conf/web/ssl.wiki.domain.com.crt
    SSLCertificateKeyFile /home/admin/conf/web/ssl.wiki.domain.com.key
    SSLCertificateChainFile /home/admin/conf/web/ssl.wiki.domain.com.ca
</VirtualHost>
wiki.domain.com.nginx.conf

Code: Select all

server {
    listen 80;
    listen [::]:80;
    server_name wiki.domain.com;

    location / {
        proxy_pass http://_my_ip_address_:3001;
    }
}
wiki.domain.com.nginx.ssl.conf

Code: Select all

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name wiki.domain.com;
	
    ssl_certificate      /home/admin/conf/web/ssl.wiki.domain.com.pem;
    ssl_certificate_key  /home/admin/conf/web/ssl.wiki.domain.com.key;
    error_log  /var/log/apache2/domains/wiki.domain.com.error.log error;

    location / {
        proxy_pass https://_my_ip_address_:3001;
    }
}
Funny enough, after I modified the files and if you try to connect to wiki.domain.com you land on domain.com (main page) so im kinda clueless now. Im mostly learn all this stuff currently and want to understand what I did wrong.

I appreciate any help and guesses

Sincerely,
Raveparty

Re: wiki.js problem

Posted: Mon Aug 27, 2018 11:11 pm
by grayfolk
First, you dont need apache server for this :)