Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 105 total)
  • Author
    Replies
  • in reply to: S3 attachment to work with Cloudfront #33119

    zhex900
    Participant

    https://ewhale.co is my site.

    What can you please give me an example of a preview image?

    This block should enable caching. Can you see anything wrong with it?

    # Set static files cache lifetime
    location ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
    access_log off; # disable logs
    expires 4M;
    add_header Pragma public;
    add_header Cache-Control “public, must-revalidate, proxy-revalidate”;
    }

    in reply to: S3 attachment to work with Cloudfront #33118

    zhex900
    Participant

    server {
    listen 80 default_server;
    port_in_redirect off;

    server_name _;

    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header Content-Security-Policy upgrade-insecure-requests;

    ### legacy health check
    location /health {
    access_log off;

    include fastcgi_params;
    fastcgi_param SCRIPT_NAME /ping;
    fastcgi_param SCRIPT_FILENAME /ping;
    fastcgi_pass unix:/var/run/php-fpm.sock;
    }

    root /var/www/web;

    if ( -f /srv/orocrm.maintance ) {
    return 503 ‘Sorry, we are on maintenance, please try again after several seconds.’;
    }

    index app.php;
    try_files $uri $uri/ @rewrite;
    location @rewrite {
    rewrite ^/(.*)$ /app.php/$1;
    }

    access_log /dev/stdout json;
    error_log /dev/stderr info;

    location ~ ^/admin.*$ {
    return 301 https://admin.ewhale.co/admin;
    }

    location ~ ^/products$ {
    return 301 https://$host/product;
    }

    # deny access to .htaccess files, if Apache’s document root
    # concurs with nginx’s one
    location ~ /\.ht {
    deny all;
    }

    location ~ /js/translation/en.js {
    }
    # One month for javascript and css
    location ~* \.(?:css|js) {

    expires 1M;
    access_log off;
    add_header Cache-Control public;
    }

    # Three months for media: images, fonts, icons, video, audio etc.
    location ~* \.(?:ico|tiff|woff|eot|ttif|svg|svgz|mp4|ogg|ogv|webm|swf|flvi)$ {
    expires 3M;
    access_log off;
    add_header Cache-Control “public, must-revalidate, proxy-revalidate”;
    }

    # Set static files cache lifetime
    location ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
    access_log off; # disable logs
    expires 4M; # cahe 1h
    add_header Pragma public;
    add_header Cache-Control “public, must-revalidate, proxy-revalidate”;
    }

    location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
    return 404;
    }
    fastcgi_pass unix:/var/run/php-fpm.sock;
    fastcgi_index app.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param SYMFONY_ENV prod;
    fastcgi_intercept_errors on;
    fastcgi_ignore_client_abort off;
    fastcgi_connect_timeout 30;
    fastcgi_send_timeout 3600;
    fastcgi_read_timeout 3600;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    }

    # You need to add additional “location” section for Websockets requests handling
    location /ws {
    # redirect all traffic to localhost:8080;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_pass http://127.0.0.1:8080/;
    proxy_redirect off;
    proxy_read_timeout 86400;

    # enables WS support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection “upgrade”;

    # prevents 502 bad gateway error
    proxy_buffers 8 32k;
    proxy_buffer_size 64k;

    reset_timedout_connection on;

    error_log /var/log/nginx/oro_wss_error.log;
    access_log /var/log/nginx/oro_wss_access.log;
    }
    }

    in reply to: Where to add the theme bundle #32803

    zhex900
    Participant

    Hi,

    I have made a theme called mena.

    https://github.com/zhex900/ewhale/tree/master/MENA

    Documentation is not complete. This will help you to have a start.

    You need to put the source in the src folder. The folders you mentioned are related to Symfony 2 application.
    You can look at this doc

    Jake He

    in reply to: change title and add to page header #32795

    zhex900
    Participant

    Sorry, some else was the problem.

    in reply to: change title and add to page header #32794

    zhex900
    Participant

    Sorry, compiling the js breaks the the code.

    Is there another way to add scripts to the header tag?

    in reply to: change title and add to page header #32793

    zhex900
    Participant

    zhex900
    Participant

    I reduced to the NEW ARRIVALS products to 4 items. It was 110 items. That was the problem.


    zhex900
    Participant

    I realised the problem is with NEW ARRIVALS slider in the front page. Is there a way to solve it?


    zhex900
    Participant
    in reply to: Attachments KnpGaufretteBundle and AmazonS3 #32666

    zhex900
    Participant

    Do I need to rebuild the image cache? How do I do that?

    in reply to: Attachments KnpGaufretteBundle and AmazonS3 #32665

    zhex900
    Participant

    One more question.

    When image is missing in media/cache/attachment/resize/ but it can be found in app/attachment

    media/cache/attachment/resize/5877/product_original/5a83cd04120ba095531688.jpg

    Why is it?

    in reply to: change on sale image #32750

    zhex900
    Participant

    It worked by running this
    app/console oro:platform:update –force

    in reply to: How to change the color of new arrival icon #32742

    zhex900
    Participant
    in reply to: How to change the color of new arrival icon #32741

    zhex900
    Participant

    Thank you for your reply. I have posted the working code.

    in reply to: How to change the color of new arrival icon #32739

    zhex900
    Participant

    Thank you!

    I have made the change in my custom theme. It worked.

    I ran the following commands
    app/console oro:assets:install –env=prod –symlink
    app/console assetic:dump –env=prod
    app/console oro:requirejs:build –env=prod

Viewing 15 replies - 1 through 15 (of 105 total)

You will be redirected to [title]. Would you like to continue?

Yes No