2

I installed magento 2.2.4 and (name directory SA ) i want to have in the url sa.com.tn and for admin sa.com.tn/interBO/admin so i tried to open sudo vi /etc/apache2/sites-available/magento2.conf but it is empty so how to do that and why this file is empty. please i need your help

4

Create configuration file for host

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/sa.com.conf

Now, modify the configuration files to match with our virtual hosts and put below code.

sudo gedit /etc/apache2/sites-available/sa.com.conf

<VirtualHost *:80>
    ServerAdmin magento2@test.com
    ServerName sa.com.tn
    ServerAlias www.sa.com.tn
    DocumentRoot /var/www/html/SA
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/SA>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>
</VirtualHost>

Enable virtual host configuration files

sudo a2ensite sa.com.conf

Restart apache web server.

sudo service apache2 restart

Add your virtual host like below and put code.

gedit /etc/hosts

127.0.0.1 sa.com.tn

Now edit core_config_data table and put url here like below

http://sa.com.tn/

|improve this answer|||||
0

Magento 2.x is not supported Windows OS and Mac OS due security reasons however we can still install Magento 2 on Windows machine using XAMPP tool, but we must fix some known errors after installing on Windows system. Check this link for more details. https://www.howtoinmagento.com/2019/06/magento-2x-does-not-support-windows-mac.html

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.