[Solved] How to change SpellChecker Port

Issues during installation and related to database
Post Reply
javito
Posts: 4
Joined: Sun Sep 15, 2019 11:52 pm

[Solved] How to change SpellChecker Port

Post by javito » Mon Sep 16, 2019 12:01 am

Hi, i decided to register here cause theres an issue that is driving me cracy and i havent been able to figure it out how to fix it, i have another webserver running on port 8080 on my computer and i need to change the spellchecker port to 8081 for example so both platforms can work in the same computer, i havent found any information on how to do this anywhere so i decided to come here and give it a shoot to see if i finally nail it.

Iv already tried to change it to 8081 on /etc/onlyoffice/documentserver/nginx/includes/http-common.conf (i read that there was suppose to be a onlyoffice only but there isnt, i guess that was in an older version)

upstream spellchecker {
server localhost:8081;
}

then restarted my linux but still doesnt work, it keeps running on port 8080
Last edited by javito on Wed Sep 18, 2019 2:26 am, edited 1 time in total.

Andrew
Posts: 59
Joined: Mon Apr 01, 2019 1:09 pm

Re: How to change SpellChecker Port

Post by Andrew » Tue Sep 17, 2019 1:39 pm

Hello,

1. Please add to /etc/onlyoffice/documentserver/local.json

Code: Select all

"SpellChecker": {
                "server": {
                        "port": 8081
                }
        }
2. Edit file /etc/onlyoffice/documentserver/nginx/includes/http-common.conf
and change 8080 to 8081 port

3. Restart Nginx

Code: Select all

service nginx restart
4. Restart Document Servers services

Code: Select all

supervisorctl restart all
Check it please and notify about the result.

javito
Posts: 4
Joined: Sun Sep 15, 2019 11:52 pm

Re: How to change SpellChecker Port

Post by javito » Wed Sep 18, 2019 2:25 am

Andrew wrote:
Tue Sep 17, 2019 1:39 pm
Hello,

1. Please add to /etc/onlyoffice/documentserver/local.json

Code: Select all

"SpellChecker": {
                "server": {
                        "port": 8081
                }
        }
2. Edit file /etc/onlyoffice/documentserver/nginx/includes/http-common.conf
and change 8080 to 8081 port

3. Restart Nginx

Code: Select all

service nginx restart
4. Restart Document Servers services

Code: Select all

supervisorctl restart all
Check it please and notify about the result.
Well i try it at first but it didnt work, because it was missing the , at the end of the last } hehe, once i corrected that it finally worked, iv been doing some research on this topic over the past few days and everything i read said that every nodejs app can set his own port with the "port": command, but since im not too deep into programing, i started trying some variations of ur solution to see why it didnt worked until i notice it was missing the , hehe thank you very much for ur help, im not the only one looking for this over the internet so i hope anyone else looking for this subject can find the answer in here hehe, ill paste the code here with the added ,

Code: Select all

"SpellChecker": {
                "server": {
                        "port": 8081
                }
        },
for all of u who are reading this, i inserted the code after the initial { in the local.json file.

ony more question for ya, why is the need to change the port in http-common file if it seems that node ignores it entirely, node only considers the changes in the json file regardless of what i do there, my guess is to have nginx foward the requests to from the port defined in http-common to the node port?

javito
Posts: 4
Joined: Sun Sep 15, 2019 11:52 pm

Re: [Solved] How to change SpellChecker Port

Post by javito » Wed Sep 18, 2019 2:42 am

after further testing i realized it cannot be set after the "rabbitmq" cause it gives an error and services wont start, i guess thats because the port has to be defined before the rabbitmq definition since is the one that defines the web address hehe

javito
Posts: 4
Joined: Sun Sep 15, 2019 11:52 pm

Re: [Solved] How to change SpellChecker Port

Post by javito » Wed Sep 18, 2019 11:59 pm

here is a little line i made with sed to add the port to the node app

Code: Select all

sed -i "/^{/a \   \"SpellChecker\": {\n           \"server\": {\n              \"port\": PORT\n           }\n     }," /etc/onlyoffice/documentserver/local.json
just replace PORT for the number u want it to be ;)

Post Reply