Combell webhosting
TIP
As a student of Thomas More, you are entitled to free web hosting and a free .be domain name at combell.com
- Login at https://www.academicsoftware.eu/ and select Combell Web hosting (Linux)
- Request a License and follow the instructions on the page
(IMPORTANT: only .be domain names are free!)
Update PHP settings
- Login to your Combell dashboard: https://my.combell.com/
- Click on Manage website
- Click on PHP settings
- General: select the same PHP version as the PHP version on your local environment
- On/off: the default settings are ok, but if your project requires some extra extensions, you can enable them here
Add a subdomain
- Create a new subdomain for your Laravel site, e.g. https://vinylshop.yourDomain.be (replace
yourDomain.be
with your real domain name)
- Domain name:
vinylshop.yourDomain.be
- Uncheck: Use the
/subsites/vinylshop.yourDomain.be
folder as the home directory of your website - Folder on the server:
/vinylshop/public
- Update your SSL settings
- Activate Forcing HTTPS
Put your website online
Recompile your assets for production
- The assets app.css and app.js are not production ready and should be minified/optimized using the command
npm run prod
.
See also Config -> Laravel Mix -> Recompile for production.
Upload the files to your hosting
TIP
- Combell supports both FTP (insecure) and SSH (secure) connections
- If possible, choose the SFTP protocol and use the data that you can find in your dashboard under SSH
- The screenshot below shows the settings in FileZilla
- Connect to your hosting and browse to the vinylshop folder (this folder contains only the public subfolder)
- Upload all folders, except .git, .idea, database, node_modules and tests
- Upload only the file .env
- Test the homepage of your online application (https://vinylshop.yourDomain.be/)
REMARK
If your online application results in an error, you can replace the content of the (remote) file public/.htaccess with this code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
1
2
3
4
5
6
2
3
4
5
6
Update the remote .env file
- Update the REMOTE (not the local!) .env file
APP_NAME="The Vinyl Shop"
APP_ENV=production
APP_KEY=base64:e77jPGGcqZ4sNADHI5f/icC+LFnBw34hpRJKSf2ftnI=
APP_DEBUG=false
APP_URL=https://vinylshop.sinners.be
1
2
3
4
5
2
3
4
5
- By setting
APP_DEBUG=false
, visitors will get a 500 | Server Error (instead of detailed error information) if something goes wrong
TIP
Set the variable APP_DEBUG
TEMPORARILY to true
if you need to solve errors in your production environment (as then more info on the errors will be shown, just as in your local development environment)
Transfer the vinylshop database
- Open http://phpmyadmin.test/ (or http://homestead.test/phpmyadmin/)
- Click on the vinylshop database, go to the tab "Exporteren" and click on "Starten"
- Save the file vinylshop.sql to your desktop
- Create a new database on your hosting
- Open your remote phpMyAdmin
- "Importeer" (= the tab next to "Exporteren") vinylshop.sql (in your newly created database on your remote phpMyAdmin)
- Open the REMOTE .env file and update all
DB_...
variables- The values of the
DB_...
variables can be found at the databases tab of dashboard
- The values of the
DB_CONNECTION=mysql
DB_HOST=IDxxxxxx_vinylshop.db.webhosting.be
DB_PORT=3306 # NOT port 33060 like in Homestead!
DB_DATABASE=IDxxxxxx_vinylshop
DB_USERNAME=IDxxxxxx_vinylshop
DB_PASSWORD=xxxxx
1
2
3
4
5
6
2
3
4
5
6
- Open one of the pages relying on the database (e.g. the shop master page) to test the remote database connection
Configure a real mail server
TIP
- From now on it's best to use REAL mail addresses (to send your mail from), as fake sender mail addresses (like @example.com or @mailinator.com) will probably show up in your spam folder
- Your application (contact page, reset password page) needs a real outgoing mail server (SMTP server) to send out the emails
- Go to https://my.combell.com/en/product/email and add a new mailaccount on your hosting
- Add a new mailbox, e.g.
admin@yourDomain.be
- Open the REMOTE .env file and update all
MAIL_...
variables- The values of the
MAIL_...
variables can be found at just created mailbox
- The values of the
MAIL_MAILER=smtp
MAIL_HOST=smtp-auth.mailprotect.be
MAIL_PORT=465
MAIL_USERNAME=admin@yourDomain.be # your email address
MAIL_PASSWORD=xxxxx # your email password
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=admin@yourDomain.be # your email address
MAIL_FROM_NAME="${APP_NAME}"
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
WARNING
If you have not already done so, add a new user with a REAL email address (your Thomas More mail address, Gmail, Hotmail, etc.)
- Try to reset the password for your real mail address
- Check your mailbox
Updates and maintenance
- A Laravel application is a never ending story ...
- When you add/update a file (Blade view, controller, ...), upload them individually to your remote host
- When you delete a file, don't forget to delete the file from your remote host as well
- When you update resources/js/vinylShop.js or resources/sass/app.scss, don't forget to upload the COMPILED files public_html/js/app.js and public_html/css/app.css
IMPORTANT: Don't forget to recompile your assets for production before uploading! - When you update your composer packages (with
composer update
), it's best to delete the whole external vendor folder and upload it again