Hi folks, I am new to Magento so please be gentle with me
I am struggling to configure a new installation of Magento CLI 2.4.3
When I enter the server IP I get a 404 error and no styling like this.
.htaccess is default and hidden
base_url = "http://IP Address/var/www/html/magento2/"
magento.conf is enabled in sites-enabled folder and reads
<VirtualHost *:80>
DocumentRoot /var/www/html/magento2/pub
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
000-default.conf is disabled
Apache2.conf is default
rewrite is enabled
What am I missing?
Any help appreciated.
Solved! Go to Solution.
I solved the problem. by adding the virtualhost proxy for Elasticseach at the top of
etc/apache2/sites-available/magento.conf.
Note this has to be before the docroute directives
<VirtualHost *:8080>
ProxyPass "/" "http://localhost:9200/"
ProxyPassReverse "/" "http://localhost:9200/"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/html/magento2/pub
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
For some reason I can't post images to this forum - sorry
Here is my site url
Please run following command on the Magento root
php bin/magento setup:static-content:deploy
It should fix the issue
Thank you for you assistance.
NOTE: Manual static content deployment is not required in "default" and "de
veloper" modes.
In "default" and "developer" modes static contents are being deployed autom
atically on demand.
If you still want to deploy in these modes, use -f option: 'bin/magento set
up:static-content:deploy -f'
I ran bin/magento setup:static-content:deploy -f and flushed cache but the problem remains.
Please check if file permissions are correct. Also refer following
https://devdocs.magento.com/guides/v2.4/config-guide/prod/prod_file-sys-perms.html
i am having the same problem
I solved the problem. by adding the virtualhost proxy for Elasticseach at the top of
etc/apache2/sites-available/magento.conf.
Note this has to be before the docroute directives
<VirtualHost *:8080>
ProxyPass "/" "http://localhost:9200/"
ProxyPassReverse "/" "http://localhost:9200/"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/html/magento2/pub
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>