[Help install] 2 forums on same server
-
@Peter-Zoltan-Keresztes said:
@djcyry Make sure you have it in /etc/nginx/sites-enabled/default as well. That's OK. I personally prefer to have different configuration file for different domains.
No , not working ... something is wrong - i do wrong
Also i have add this line to hosts file on mi pc : 62.75.159.105:4567 www.nodebb.es
because i think the dns is not ready yet : http://www.intodns.com/nodebb.esPD. the second domain , with the dns full propagated is works : http://hercio.net/
in this setting i neet to modifi the path of nodebb in some place? -
Now i have install apache and i have edited the :
/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-enabled/000-default.confby adding this lines :
<VirtualHost 62.75.159.105:4567>
DocumentRoot "/root/nodebb/"
ServerName www.hercio.net
</VirtualHost>Only its responds from www.hercio.net:4567
I dont know what to do for working and install the second forum .... -
I don't know how to setup with apache cause I never use apache but if you want to try with nginx you could paste your nginx configuration
also your config.js while you can modify the identifier from the config.
-
@Peter-Zoltan-Keresztes said:
I don't know how to setup with apache cause I never use apache but if you want to try with nginx you could paste your nginx configuration
also your config.js while you can modify the identifier from the config.
I will try with apache one more time , if not i install ngingx .
One thing , when i install the second forum , the database port still the same port 6379 ?
I have install the 2nd forum , and i modify only the clone folder name, port to 4568 and database 1 , its ok ? -
@Peter-Zoltan-Keresztes said:
@djcyry Yes the database port does not change just the database itself. You can use 0 for first site and 1 for the second
Done.
Now ,lets see if anyone knows how to setup that proxy on apache . -
You might want to check the documentation. Use google to find it.
-
Done with nginx .
First you need to create a .config file on /etc/nginx/conf.d
Something like this :server { listen 80; server_name example.com; #charset koi8-r; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
}
}Then you need to edit 2 lines :
- example.com with your website
- proxy_pass http://127.0.0.1:4567; with your ip adress
Afer edit , save that file and then add that code , same code on this files :
/etc/nginx/sites-available/default
/etc/nginx/sites-enabled/defaultFor redirect non-www to www or vicee versa , add this code :
server {
listen 80;
server_name example.com;return 301 http://www.examplee.com$request_uri;
}
Thanks to all
-
@djcyry you don't have to change proxy_pass http://127.0.0.1:4567 to add your IP... leave it as it is
if you add the server block in a .conf file under /etc/nginx/conf.d, then you don't need to add it in /etc/nginx/sites-available/default and
/etc/nginx/sites-enabled/default