2017-05-13 15:39
浏览 55


What will be the Joomla configuration Log, Tmp paths in configuration.php when we are deploying application on AWS VPC- EC2 Instance. My VPC is auto scalable, hence I assume that some how the Logs should be in any shared location? or should be on EC2 Instance local location? Also what will be the path that we will use to mention in our configuration.php of joomla.

public $log_path = '/home/public_html/logs'; 
public $tmp_path = '/home/public_html/temp'; 

图片转代码服务由CSDN问答提供 功能建议

我们在 configuration.php 中的Joomla配置日志,Tmp路径是什么 在AWS VPC-EC2实例上部署应用程序。 我的VPC是可自动扩展的,因此我假设一些日志应该在任何共享位置? 或者应该在EC2 Instance本地位置? 那么我们将在joomla的 configuration.php 中提到的路径是什么。

  public $ log_path ='/ home / public_html / logs';  
public $ tmp_path ='/ home / public_html / temp';  
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doumi2106 2017-06-01 06:45

    In VPC when we are having multiple availability zones in which our web server is running, there we get common problem on shared media contents. For example in one particular case when log or temp path, and in case of images or files that could be uploaded by user/admin or generated by the application.

    When Load Balancer directs website traffic to random servers(running in different availability zones) this becomes a big problem to tackle.

    In such cases, we must need to have a shared common location that holds these media files (that are uploaded by users or generated by the application). Otherwise each server (in a availability zone) will be saving files separately, and if by chance last time user uploaded photo being in Availability Zone-A server the next time if user directed to (by Load Balancer) Availability Zone-B server the files will not be there. This is a very bad case.


    1. Preferably it is recommended to user AWS EFS service that is designed by AWS to address this particular need. This creates a common location to hold shared/common files, that can be accessed more like a local filesystem folder. Just like NFS mounted folder.

    2. You can use S3 storage which is also recommended in some cases, but you need to modify or setup your code in a way that it can handle S3 storage filesystem. Moreover you can also mount S3 storage to your Web server (EC2 Instance) using 3rd party S3FS. But AWS does recommend to 50% recommendation. As AWS may not be able to do some monitoring stuff that helps customers to monitor the traffic and other stuff.

    3. You can also create a stand alone EC2 instance which main job will only be to hold these common media files. This can be created anywhere in Public or Private subnet, it will work as far as it is in the same Route Table as other Subnets are. We can use this Instance as NFS by create required number of directories in this instance and exporting them to specific web servers (sitting in our different availability zones) or can also export to range of IPs (if we have setup Auto Scalable Group in AWS). Then each client (web server) need to mount the exported directories to the locations which and where our application expect those directories. These directories will then act like a normal local directory but will be common across all running web server in different availability zones.

    4. If we have a NAT EC2 Instance running, we can also use it to act as a NFS server and create directories on it and export them to web servers.

    Conclusion: The space and budget cost are two important factors. The performance is more like similar in all cases mentioned above. When we have media files under <10GB then we either should use right EC2 instance for NFS. But as if we setup separate EC2 instance the option#3 may cost of read/writes in future, in that case option#4 will be more appropriate. S3 is right option as well but when we have option to change the code accordingly. S3 is also right option for huge file sizes.

    解决 无用
    打赏 举报

相关推荐 更多相似问题