How to use my own subdomain and block the port 4567
-
How you do it. What do I have to place on what files.
Im on Apache UbuntuI want it on forum.mydomain.com and block http://directip:4567 access.
Thanks -
Using Apache, add this to -> httpd-vhosts.conf
<VirtualHost *:80>
ServerName yourwebsite
ServerAdmin your@email
#DocumentRoot /folder
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocketProxyPass /socket.io/ http://127.0.0.1:4567/socket.io/
ProxyPassReverse /socket.io/ http://127.0.0.1:4567/socket.io/ProxyPass / http://127.0.0.1:4567/
ProxyPassReverse / http://127.0.0.1:4567/
</VirtualHost> -
@evoixmr Thanks, I am new to nodebb so, if i am using the email
[email protected]. my name is Kevin Andrews and the domain i want it to be on is community.kenygamer.com how would it look like?PS: What is the path to the file, I am on Ubuntu.
Regards
-
@kenygamer Here you go. Doing this way will let you host multiple website, if you wanted to.
<VirtualHost *:80>
ServerName http://community.kenygamer.com
ServerAdmin [email protected]
#DocumentRoot /nodebbfolder <-not important, just a note to you
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocketProxyPass /socket.io/ http://127.0.0.1:4567/socket.io/
ProxyPassReverse /socket.io/ http://127.0.0.1:4567/socket.io/ProxyPass / http://127.0.0.1:4567/
ProxyPassReverse / http://127.0.0.1:4567/
</VirtualHost> -
-
@kenygamer Do not copy and paste, replace username and passwordd information.
Terminal
$ mongo
use nodebbdb.createUser( { user: "username", pwd: "<Enter in a secure mongo db password>", roles: [ "readWrite" ] } )
Edit ->config.json
{
"url": "http://community.kenygamer.com",
"port": "4567",
"use_port": false,
"secret": "mongo password",
"database": "mongo",
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "username",
"password": "mongo db password",
"database": "nodebb"
},
"bcrypt_rounds": 12,
"upload_path": "/public/uploads",
"relative_path": ""
}