Page 1

Discourse Install alongside apache server >>> Update os sudo apt-get update sudo apt-get upgrade >>>> Update SSL rules sudo ufw app list sudo ufw allow OpenSSH sudo ufw enable sudo ufw status >>>>>Rename Host : hostnamectl set-hostname example_hostname hostname >>>> Confirm hostname sudo nano /etc/hosts

>>>>> TimeZone Settings dpkg-reconfigure tzdata >>>>>Install Docker first : wget -qO- https://get.docker.com/ | sh sudo apt-get update sudo apt-get install -y docker-ce sudo systemctl status docker

>>>> Install Discourse : sudo -s mkdir /var/discourse apt install git git clone https://github.com/discourse/discourse_docker.git /var/discourse


cd /var/discourse ./discourse-setup

Note: If you need to change or fix these settings after bootstrapping, edit your /containers/app.yml file and run ./launcher rebuild app. Otherwise, your changes will not take effect.

Rember to skip letsencrpt email Check discourse should run on applicable domain where we need to run.

Configuring PORT for apache or ngix cd /var/discourse sudo nano containers/app.yml Change port expose: - "25654:80" # fwd host port 80 to container port 80 (http) sudo ./launcher rebuild app sudo ./launcher stop app

>>> Installing

apache

sudo apt-get install apache2

>> Configuring host

Proxy rewrite rules configuring: a2enmod proxy proxy_http rewrite Disable default config file: sudo a2dissite *default -------------------------


If we need to install website in subdomain it takes 1 to 2 hr waiting time to DNS reconfigure with server Check in Ubuntu server about the subdomain in configured. Ping example.com ------------------------------Adding configuration file of website: sudo nano /etc/apache2/sites-available/discuss.gurwinder.tk.conf Paste These setting for port 80 for redirecting to our new port 25654. Virtual Port settings <VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName discuss.gurwinder.tk ServerAlias www.discuss.gurwinder.tk ProxyPass / http://discuss.gurwinder.tk:25654/ ProxyPassReverse / http://discuss.gurwinder.tk:25654/ </VirtualHost>

>>> Enable website sudo a2ensite discuss.gurwinder.tk.conf Restart apache: service apache2 reload >>>>Finally rebuild discourse: sudo ./launcher rebuild app

>>>Some Important settings Visit this link : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysqlphp-lamp-stack-on-ubuntu-16-04


>>>Installing more sites cd /var/www/html

>>>Create website folder sudo mkdir gurwinder.tk >>>create subfolders sudo mkdir -p gurwinder.tk/public_html sudo mkdir -p gurwinder.tk/log sudo mkdir -p gurwinder.tk/backups >>>>Move to sudo nano /etc/apache2/sites-available/gurwinder.tk.conf

>>>>Virtual Host settings

# domain: gurwinder.tk # public: /var/www/html/gurwinder.tk/public_html/

<VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin webmaster@gurwinder.tk ServerName gurwinder.tk ServerAlias www.gurwinder.tk

# Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/html/gurwinder.tk/public_html # Log file locations


LogLevel warn ErrorLog /var/www/html/gurwinder.tk/log/error.log CustomLog /var/www/html/gurwinder.tk/log/access.log combined </VirtualHost>

>>>>Add site to enable mode sudo a2ensite gurwinder.tk.conf

>>>Restart apache service apache2 reload

>> Adding User manually in discourse ./launcher enter app rake admin:create exit

Test upload  

sdfsd

Test upload  

sdfsd

Advertisement