cancel
Showing results for 
Search instead for 
Did you mean: 

Hosting magento 2 on own linux server

Hosting magento 2 on own linux server

Good day,

Can anyone please assist me, i followed all the steps to install magento 2 successfully but cannot get my hosted site on my custom domain. 

Error "the page you displaying cannot be redirected".

 

I have done the following already in magento/DB:

web/unsecure/base_url = http://www.mydomain.co.za

web/secure/base_url = http://www.mydomain.co.za

 

Highly appreciate if anyone can confirm the correct steps for a linux machine.

 

Regards,

Keenan

 

 

9 REPLIES 9

Re: Hosting magento 2 on own linux server

Hello @keenan_simpson,

 

There is look like the domain is pointed with hosting root directory. Please go to domain root directory and create any file and execute in the browser. If it not executed then contact hosting provider to locate this issue. 

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Hosting magento 2 on own linux server

@keenan_simpson

 

Have you done with clear cache after changing these URLs, please run once php bin/magento cache:flush and then try again.

Manish Mittal
https://www.manishmittal.com/

Re: Hosting magento 2 on own linux server

Thanks Manish, i came far as getting the site redirected to my domain name.

 

I'm not sure if my config file for apache is configured correctly, i think the rewrite rules might be an issue here. See attached screenshot. The "url" /magento was not found on the server.

 

Highly appreciate your assistance

 


1b9a3f86-d8a3-4f2a-8b03-6511386e248a.jpeg

 

Regards,

Keenan

Re: Hosting magento 2 on own linux server

Hello @keenan_simpson

 

I can not find attached screenshot, can you please share 3rd party link for image so I can check or if your thinking rewrite rules issue in htacess. you can just replace your htaccess with fresh magento htacess.

 

Or share more details so I can help.

Manish Mittal
https://www.manishmittal.com/

Re: Hosting magento 2 on own linux server

Sorry about that, please use the below link to access uploaded image.

https://unsee.cc/33198c45/

 

My apache configuration is as follows:

 

<VirtualHost *:80>

ServerName mydomain.co.za
DocumentRoot /var/www/html/magento
<Directory /var/www/html>
Options FollowSymLinks
Require all granted
AllowOverride all
</Directory>
</VirtualHost>

 

Is there anything that needs to be changed, if possible can you forward me the default .htaccess file. I've currently got the magento setup running on my own linux machine. (also where it should be placed in)

e.g. /var/www/html/magento

 

 

Re: Hosting magento 2 on own linux server

Virtual host seems okay, please try with attached .htacess.

 

https://github.com/magento-2/magento-2-community/blob/master/.htaccess

 

 

Manish Mittal
https://www.manishmittal.com/

Re: Hosting magento 2 on own linux server

Donr forget point NameServer of your domain to your home computer IP address in your domain panel.

Re: Hosting magento 2 on own linux server

Hello @keenan_simpson,

 

Please create phpinfo.php file in root directory and add below command in it 

<?php
phpinfo();

If it executes then you have in Magento issue otherwise your domain is not pointed with your hosting. 

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Hosting magento 2 on own linux server

Your screen shot shows engagegc.co.za yet your server config is using mydomain.co.za, which is your actual domain name?

 

Carrie

Magento 1 Developer Plus Certified
https://www.bcsengineering.com/magento_customizations/