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- | 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 /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


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 ------------------------------Adding configuration file of website: sudo nano /etc/apache2/sites-available/ Paste These setting for port 80 for redirecting to our new port 25654. Virtual Port settings <VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName ServerAlias ProxyPass / ProxyPassReverse / </VirtualHost>

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

>>>Some Important settings Visit this link :

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

>>>Create website folder sudo mkdir >>>create subfolders sudo mkdir -p sudo mkdir -p sudo mkdir -p >>>>Move to sudo nano /etc/apache2/sites-available/

>>>>Virtual Host settings

# domain: # public: /var/www/html/

<VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin ServerName ServerAlias

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

LogLevel warn ErrorLog /var/www/html/ CustomLog /var/www/html/ combined </VirtualHost>

>>>>Add site to enable mode sudo a2ensite

>>>Restart apache service apache2 reload

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

Test upload  


Test upload