We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to serve your Oxwall static content from your subdomain [Solved] | Forum

Locofans
Locofans Jul 20 '16
Greetings everyone,

    I noticed some of you had been struggling with your Oxwall website speed, which sometimes is frustrating. This will boost your site performance by 20 seconds less.

Before we can continue, please be advised that if you have SSL installed on your main domain, you will also need SSL installed on your subdomains as well. For you won't be able to transfer files over an unencrypted connection.


Let's get started!


1- From your cPanel create two (2) subdomains, for the sake of best practice let's call them "static" and "userfiles". Your subdomains should point to your main oxwall folder.

     http://static.yourdomain.com           or        https://static.yourdomain.com

     http://userfiles.yourdomain.com      /; or        https://userfiles.yourdomain.com


2- Make your subdomains a CNAME to your main domain.

 

3- From your "ow_include" folder open the file name "config.php".


4- Edit line 15 and 16, and remove the OW_URL_ROOT from:


     Line15. define('OW_DIR_STATIC', OW_URL_ROOT.'ow_static/');         ===>     define('OW_DIR_STATIC', 'http://static.yourdomain.com/ow_static/');


     Line 16. define('OW_DIR_USERFILES', OW_URL_ROOT.'ow_userfiles/');    ===>     define('OW_DIR_USERFILES', 'http://userfiles.yourdomain.com/ow_userfiles/');


(If you have SSL installed on your subdomains aswell, add https:// )


BEFORE



AFTER


PS:
a) Do not try it on a live site unless you know what you are doing.
b) The changes made in "config.php" might be overwritten with Oxwall updates.
c) The process is 100% safe, proceed with caution.


The Forum post is edited by Locofans Jul 21 '16
Locofans
Locofans Jul 20 '16
The next improvement will be how to combine the CSS and JS files into one master files, which will reduce the amount of server request.
Webster Molaudi
Webster Molaudi Jul 20 '16
Thanks
Locofans
Locofans Jul 21 '16
I need feedback people, please let me know if it had improved your site performance.

The Forum post is edited by Locofans Jul 26 '16