{"id":18778309,"url":"https://github.com/ajsalemo/react-apache-webserver","last_synced_at":"2026-04-05T23:32:46.616Z","repository":{"id":103501155,"uuid":"429225025","full_name":"Ajsalemo/React-Apache-WebServer","owner":"Ajsalemo","description":"Examples of how to serve React production builds with Apache on Azure Linux App Service.","archived":false,"fork":false,"pushed_at":"2021-11-22T21:57:38.000Z","size":677,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T18:48:18.677Z","etag":null,"topics":["apache","apache2","appservice","azure","container","docker","htaccess","javascript","linux","react","spa"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ajsalemo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-17T22:52:55.000Z","updated_at":"2021-11-22T21:57:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"784a481a-c2f2-4e52-9885-c3da45b0776e","html_url":"https://github.com/Ajsalemo/React-Apache-WebServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ajsalemo/React-Apache-WebServer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2FReact-Apache-WebServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2FReact-Apache-WebServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2FReact-Apache-WebServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2FReact-Apache-WebServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajsalemo","download_url":"https://codeload.github.com/Ajsalemo/React-Apache-WebServer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2FReact-Apache-WebServer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31454197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apache","apache2","appservice","azure","container","docker","htaccess","javascript","linux","react","spa"],"created_at":"2024-11-07T20:15:52.834Z","updated_at":"2026-04-05T23:32:46.611Z","avatar_url":"https://github.com/Ajsalemo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React-Apache-WebServer\n\nThis sample shows how to host a React application (or other SPA's) and serve it with Apache to do things such as http -\u003e https, domain redirects, rewrites, etc. on Azure Linux App Services with an `.htaccess` file or changing `apache2.conf`.\n\n`react-apache-webserver`:\n- This sample is intended to be deployed to a Linux App Service 'blessed Image' - under PHP8 (ex. PHP7.3, PHP7.4) since 7.x versions run with Apache. PHP8 currently uses NGINX.\n- This sample can be used in 2 general ways. \n  - 1.) Deploying the `build` folder itself and the rest of the site content under `react-apache-webserver`, this method will require the use of the `startup.sh` script which uses the `apache2.conf` file to point the `DocumentRoot` to `/home/site/wwwroot/build` since this contains the `index.html` and the rest. You can follow [this](https://azureossd.github.io/2020/01/23/php-custom-startup-script-app-service-linux/) guide to set up how to use the `startup.sh` in a custom startup script. \n  - 2.) Deploying only the **contents** of the `build` folder. This would then place the static content in `build` (ex. `index.html`) directly under `/home/site/wwwroot`, so therefor no custom startup script or changing Apache functionality would be needed. \n  - In both cases building the project locally needs to be done first - ex. `yarn build` or `npm run build` and setting the AppSetting `SCM_DO_BUILD_DURING_DEPLOYMENT` to `false` needs to be done to avoid having `Oryx` build the project during deployment, which will cause it to fail due to the language mismatch. \n  - In both scenarios an `.htaccess` can be used for various functionality.\n\n`react-apache-webserver-containerized`:\n- This is a custom container/Image of the first example with `ssh` functionality integrated.\n- The `.htaccess` currently is set to redirect to `www` - however, this can be changed if desired\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsalemo%2Freact-apache-webserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajsalemo%2Freact-apache-webserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsalemo%2Freact-apache-webserver/lists"}