{"id":18898655,"url":"https://github.com/craryprimitiveman/onlinecourses","last_synced_at":"2025-04-15T02:32:42.351Z","repository":{"id":24624741,"uuid":"28033790","full_name":"CraryPrimitiveMan/OnlineCourses","owner":"CraryPrimitiveMan","description":"An online courses website based on yii2","archived":false,"fork":false,"pushed_at":"2015-07-24T16:44:07.000Z","size":7410,"stargazers_count":0,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T14:21:17.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CraryPrimitiveMan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-15T11:29:13.000Z","updated_at":"2015-01-11T10:10:51.000Z","dependencies_parsed_at":"2022-07-11T06:46:50.200Z","dependency_job_id":null,"html_url":"https://github.com/CraryPrimitiveMan/OnlineCourses","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraryPrimitiveMan%2FOnlineCourses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraryPrimitiveMan%2FOnlineCourses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraryPrimitiveMan%2FOnlineCourses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraryPrimitiveMan%2FOnlineCourses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CraryPrimitiveMan","download_url":"https://codeload.github.com/CraryPrimitiveMan/OnlineCourses/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248994157,"owners_count":21195329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:43:29.251Z","updated_at":"2025-04-15T02:32:41.831Z","avatar_url":"https://github.com/CraryPrimitiveMan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"OnlineCourses\n=============\n\nAn online courses website based on [Yii2](https://github.com/yiisoft/yii2) Advanced Application.\n\nThe frontend app based on [angular-requirejs-seed](https://github.com/tnajdek/angular-requirejs-seed).\n\nDIRECTORY STRUCTURE\n-------------------\n\n```\ncommon\n├── config/              contains shared configurations\n├── mail/                contains view files for e-mails\n└── models/              contains model classes used in both backend and frontend\nconsole\n├── config/              contains console configurations\n├── controllers/         contains console controllers (commands)\n├── migrations/          contains database migrations\n├── models/              contains console-specific model classes\n└── runtime/             contains files generated during runtime\nbackend\n├── assets/              contains application assets such as JavaScript and CSS\n├── config/              contains backend configurations\n├── controllers/         contains Web controller classes\n├── models/              contains backend-specific model classes\n├── runtime/             contains files generated during runtime\n├── views/               contains view files for the Web application\n└── web/                 contains the entry script and Web resources\nfrontend\n├── assets/              contains application assets such as JavaScript and CSS\n├── config/              contains frontend configurations\n├── controllers/         contains Web controller classes\n├── models/              contains frontend-specific model classes\n├── runtime/             contains files generated during runtime\n├── views/               contains view files for the Web application\n├── web/                 contains the entry script and Web resources\n└── widgets/             contains frontend widgets\napps\n├── app/                 contains frontend app files\n├── config/              contains karma config\n├── index.html           the entry point\n├── logs/                contains app logs\n├── scripts/\n└── test/                contains tests with angular\nvendor/                  contains dependent 3rd-party packages\nenvironments/            contains environment-based overrides\ntests                    contains various tests for the advanced application\n└── codeception/         contains tests developed with Codeception PHP Testing Framework\n```\n\n\nREQUIREMENTS\n------------\n\nThe minimum requirement by this application template that your Web server supports PHP 5.4.0.\n\n\nINSTALLATION\n------------\n\nDownload the project and unzip in /var/www folder.\nI uploaded vender folder, you can use it without composer.\n\n### Config nginx\n\n```sh\nserver {\n    charset      utf-8;\n    client_max_body_size  200M;\n\n    listen       80; ## listen for ipv4\n    #listen       [::]:80 default_server ipv6only=on; ## listen for ipv6\n\n    server_name  course.com;\n    root         /var/www/OnlineCourses;\n\n    access_log /var/log/nginx/course.com-access.log;\n    error_log  /var/log/nginx/course.com-error.log;\n\n    location / {\n        root  /var/www/OnlineCourses/apps;\n        rewrite ^/?(.*) /apps/index.html last;\n    }\n\n    location /app/ {\n        alias /var/www/OnlineCourses/apps/app/;\n    }\n\n    location /vendor/ {\n        alias /var/www/OnlineCourses/vendor/;\n    }\n\n    location /api {\n        alias  /var/www/OnlineCourses/frontend/web;\n\n        rewrite  ^(/api)/$ $1 permanent;\n        try_files  $uri /frontend/web/index.php?$args;\n    }\n\n    # avoiding processing of calls to non-existing static files by Yii\n    location ~ ^/api/(.+\\.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar))$ {\n        access_log  off;\n        expires  360d;\n\n        rewrite  ^/api/(.+)$ /frontend/web/$1 break;\n        rewrite  ^/api/(.+)/(.+)$ /frontend/web/$1/$2 break;\n        try_files  $uri =404;\n    }\n\n    location /admin {\n        alias  /var/www/OnlineCourses/backend/web;\n\n        rewrite  ^(/admin)/$ $1 permanent;\n        try_files  $uri /backend/web/index.php?$args;\n    }\n\n    # avoiding processing of calls to non-existing static files by Yii\n    location ~ ^/admin/(.+\\.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar))$ {\n        access_log  off;\n        expires  360d;\n\n        rewrite  ^/admin/(.+)$ /backend/web/$1 break;\n        rewrite  ^/admin/(.+)/(.+)$ /backend/web/$1/$2 break;\n        try_files  $uri =404;\n    }\n\n    location ~ \\.(php|htm|html)$ {\n        include  fastcgi_params;\n        # check your /etc/php5/fpm/pool.d/www.conf to see if PHP-FPM is listening on a socket or port\n        fastcgi_pass  unix:/var/run/php5-fpm.sock; ## listen for socket\n        #fastcgi_pass  127.0.0.1:9000; ## listen for port\n        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        try_files  $uri =404;\n    }\n    #error_page  404 /404.html;\n\n    location = /requirements.php {\n        deny all;\n    }\n\n    location ~ \\.(ht|svn|git) {\n        deny all;\n    }\n}\n```\n\nIf you cannot access html files, you need to add to the /etc/php5/fpm/pool.d/www.conf inside the [www] section\n\n```sh\nsecurity.limit_extensions = .php .html\n```\n\nSee [here](https://bugs.php.net/bug.php?id=60763)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraryprimitiveman%2Fonlinecourses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraryprimitiveman%2Fonlinecourses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraryprimitiveman%2Fonlinecourses/lists"}