Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Deploy single page application Angular: 404 Not Found nginx

# for those not using a Staticfile might wanna try this.

# I had the same problem with nginx serving angular. The following is the default config file, probably found somewhere in /etc/nginx/sites-available/yoursite

     location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;
    }
# but what we acctually want is...

     location / {
            # First attempt to serve request as file, then
            # as directory, then redirect to index(angular) if no file found.
            try_files $uri $uri/ /index.html;
    }
Comment

PREVIOUS NEXT
Code Example
Shell :: rh-python36 version check command line 
Shell :: visual basic code syntax 
Shell :: add files to hadoop 
Shell :: instalar Git en PowerShell 
Shell :: how to install MTAG IN LINUX 
Shell :: how to install stack haskell in manjarp 
Shell :: Package `pywhatkit` not found 
Shell :: how to change the terminal start in directory 
Shell :: how to get the inode numbers 
Shell :: select an object based a field which is like a string jq 
Shell :: android studio add flutter plugin 
Shell :: Branching in a repository 
Shell :: https://cloud.google.com/python/docs/reference/cloudscheduler/latest/google.cloud.scheduler_v1.services.cloud_scheduler.CloudSchedulerClient#google_cloud_scheduler_v1_services_cloud_scheduler_CloudSchedulerClient_delete_job 
Shell :: mark raid drive as faulty linux 
Shell :: git synchronize a branch in a fork 
Shell :: cmake macos disable code signing 
Shell :: proxmox linux type 
Shell :: more wsl2 images 
Shell :: start a new shell to examine the situation 
Shell :: nmap script location in kali 
Shell :: nextjs cli node options 
Shell :: query of meta command psql 
Shell :: apache terminal count files in folder 
Shell :: install sanity with free boosted plan - sanity.io -sonny 
Shell :: remove mac ._ files windows 
Shell :: not a git repository after clone 
Shell :: setup mongodb locally on centos 8 
Shell :: Unit Tests 
Shell :: ssh rembeber password 
Shell :: how to push existing git repository 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =