Comment to 'Image Tanscoder and storage.php'
  • To transcode an image or video UNA needs to fetch the original file, UNA tries to get it via URL from the server itself, however if your site can't be loaded from the server itself then it fails.

    It maybe different way to fix this, but in most cases it helps if you add the following line to /etc/hosts file:

    127.0.0.1 your-una.domain
    
    • Hello, i can't upload images here is my hosts...is it ok for you?

      image_transcoder.php?o=sys_images_editor&h=1245&dpx=2&t=1682959894

      • If you define a server on which the application runs with the domain name in server settings, how will you scale the application on several servers? I think that the domain name must be defined in the reverse proxy level or in the web server or load balancer server, I don't understand how you think it is possible to build a social network on a single server. 😀

        In the context of scaling an application across multiple servers, defining the domain name at the reverse proxy level or within the web server or load balancer configuration is crucial. This setup allows for efficient distribution of traffic across multiple servers, enabling the application to handle increased load effectively. Without such configuration, attempting to run a social network or any sizable application on a single server would be impractical due to limitations in resources availability and capacity.

        Any modern app must be designed for scalability,

        If an application lacks scalability, the time and resources poured into it may go to waste. It's impractical to build a business model around an application that can't grow. However, if the aim is purely recreational, experimenting with such an app can enhance the user experience, but its utility remains confined to that realm. In a business context, for an application to launch online, it must boast scalability and high availability, capable of withstanding hardware failures. Moreover, for financial efficiency, it should self-scale both vertically and horizontally. Otherwise, it risks draining resources without yielding results.

        And when we're talking about building a social network with millions of users, that means you're headed for bankruptcy from the very beginning.

        • It's possible to have the same domain and several web instances, it depends on configuration, also you can make UNA to work on any domain as well if you need, to do this just change:

          define('BX_DOL_URL_ROOT', 'https://example.com/');
          

          to:

          define('BX_DOL_URL_ROOT', ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') ? 'https' : 'http') . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'https://example.com/') . '/');