Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment - htaccess for shared hosting servers #27991

Closed
lluz opened this issue Jan 8, 2019 · 6 comments
Closed

Deployment - htaccess for shared hosting servers #27991

lluz opened this issue Jan 8, 2019 · 6 comments
Assignees
Labels
effort1: hours freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: needs eng input type: bug/fix
Milestone

Comments

@lluz
Copy link

lluz commented Jan 8, 2019

馃摎 Docs or angular.io bug report

Description

An addition to the "Deployment" documentation.

馃敩 Minimal Reproduction

What's the affected URL?

https://angular.io/guide/deployment

Reproduction Steps

Go to the "Fallback configuration examples"

Expected vs Actual Behavior

Addition to the 'Apache section':

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) index.html [NC,L]

I followed this comment:
#11884 (comment)

馃摲Screenshot

馃敟 Exception or Error

馃實 Your Environment

Browser info

Anything else relevant?

Distribution uploaded to a regular shared Apache server.

@lluz lluz changed the title Deployment - htaccess for shared servers Deployment - htaccess for shared hosting servers Jan 8, 2019
@kara kara added the comp: docs label Jan 8, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jan 8, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jan 25, 2019
@jenniferfell
Copy link
Contributor

jenniferfell commented Jan 25, 2019

Notes to writer:
https://angular.io/guide/deployment#fallback-configuration-examples

The .htaccess shown above should be used instead of what's in the doc.

@jenniferfell
Copy link
Contributor

@lluz : Thank you for researching this and letting us know. My team isn't currently set up to test Apache. Is there any chance you'd be willing to submit a PR for the doc update, based on what worked for you? See Contributing to Angular for more info.

@lluz
Copy link
Author

lluz commented Jan 25, 2019

@jenniferfell
Thanks for picking up on this minor issue.
Unfortunately I am no expert on Apache so I am unable to describe (comment) the solution and compare/check if it is better than the one currently documented.
The only thing I know is that it is a complementary option that works well on my common Apache shared hosting servers.
I have however called out to @gthomas2 ( #11884 (comment) ) to see if he would be willing to make the pull request.
Hope someone with the right skills can pick this up, because it is a bit annoying when you publish a distribution (Javascript web app) to a common basic Apache server only to find out that a simple browser page refresh (F5) will give you a "Not Found" default server page.

@rockument69
Copy link
Member

Looks like we need engineering input for this.

@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed severity3: broken labels Oct 1, 2020
@josephperrott josephperrott self-assigned this May 25, 2021
@josephperrott
Copy link
Member

Closing this out as a duplicate of #21201

As noted in the closing comment of #21201 (comment), while the proposed configuration is valid and will work. We are not providing a production ready configuration to be used, the intention is for this to be a basic configuration for a simple development environment as a starting point. The current configuration we use has good compatibility and is easy to reason about what the lines of the configuration do.

Currently security practice recommendation for production apache use as I understand it is actually to use a httpd.conf file rather than .htaccess file anyway.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: hours freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: needs eng input type: bug/fix
Projects
None yet
Development

No branches or pull requests

7 participants