Bumped by Community user
    Bumped by Community user
10 added 101 characters in body
source | link
  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it, or how to remove it from the url and make the system look in the right place without having to re-upload all my images. This test confirmed again that when not serving from pub, the site works fine...but images wereappear to be already being served in a strange way. (unable to confirm this without a snapshot of the system before following docs to serve from "pub")

    How do you resolve this?

  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it, or how to remove it from the url and make the system look in the right place without having to re-upload all my images. This test confirmed again that when not serving from pub, the site works fine...but images were already being served in a strange way.

    How do you resolve this?

  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it, or how to remove it from the url and make the system look in the right place without having to re-upload all my images. This test confirmed again that when not serving from pub, the site works fine...but images appear to be already served in a strange way (unable to confirm this without a snapshot of the system before following docs to serve from "pub")

    How do you resolve this?

9 added 10 characters in body
source | link

My original installation of v2.3.0 was working fine. All images showed up for categories. I decided (after setting up a lot of categories and images for those categories) to serve the site from pub.

My original installation was working fine. All images showed up for categories. I decided (after setting up a lot of categories and images for those categories) to serve the site from pub.

My original installation of v2.3.0 was working fine. All images showed up for categories. I decided (after setting up a lot of categories and images for those categories) to serve the site from pub.

8 added 120 characters in body
source | link
  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it, or how to remove it from the url and make the system look in the right place without having to re-upload all my images. This test confirmed again that when not serving from pub, the site works fine...but images were already being served in a strange way.

    How do you resolve this?

  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it. This test confirmed again that when not serving from pub, the site works fine...but images were already being served in a strange way.

    How do you resolve this?

  1. Looking for errors in /var/log/apache2/error.log and /var/log/apache2/error.log (found nothing other than a record of 404 but no permission errors.)
  2. Checked magento/var/log/system.log, magento/var/log/exception.log and magento/var/log/debug.log, no permission errors.
  3. Switching modes:

    bin/magento deploy:mode:set production  
    bin/magento cache:flush  
    bin/magento deploy:mode:set developer  
    bin/magento cache:flush  
    
  4. Made sure had default .htaccess in magento directory.

  5. Made sure pub/ had default .htaccess.

  6. Doc: bin/magento setup:static-content:deploy -f

  7. "Flush Cache Storage", "Flush Magento Cache", "Flush Catalog Images Cache", and "Flush Static Files Cache" from admin area > System > Cache Management.

  8. Refresh all cache types from admin area > System > Cache Management.

  9. Re-ran permissions as root cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

  10. Ran alternative permissions commands (does same thing as above):

    cd /var/www/html/<magento install directory>
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data . # Ubuntu
    chmod u+x bin/magento
    
  11. Checking permissions of example image from magento directory:

    magentouser$ ls -al pub/media/Shoes/nike.jpg
    -rw-rw-r-- 1 magentouser www-data 77645 Jan 15 17:14 pub/media/Shoes/nike.jpg
    
  12. rm -rf var/cache

  13. bin/magento indexer:reindex

  14. Checked my /etc/apache2/sites-available/000-default.conf

    Listen 8080
    <VirtualHost *:80>
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/pub
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    <Directory "/var/www/html">
    AllowOverride all
    </Directory>
    
  15. Re-started systemctl restart apache2

  16. Change DocumentRoot back to /var/www/html/magento2, and restarted apache2.

    Note: i was in the wrong demo server the first time i tried step 16 again. I had spun up so many test servers trying to re-duplicate the issue in different ways (too many terminals open trying to test different variations without attention to IP). I noticed while deleting all the demo servers from the network that the command was in the wrong one. After switching server 56 back to documentRoot to /var/www/html/magento2, and restarting apache on server 56, all images show up again normally. but the URL is still like (example): http://192.168.5.10/pub/media/Shoes/nike.jpg. I'm still not sure how "pub" got in there or even how i would add "pub" if it was't there and I wanted it, or how to remove it from the url and make the system look in the right place without having to re-upload all my images. This test confirmed again that when not serving from pub, the site works fine...but images were already being served in a strange way.

    How do you resolve this?

7 added 465 characters in body
source | link
6 added 465 characters in body
source | link
5 edited tags; edited title
| link
4 added 549 characters in body
source | link
3 added 105 characters in body
source | link
2 added 38 characters in body
source | link
1
source | link