The Apache alias file was not found

I want to set up an alias in Apache like this:

I do that:

    DocumentRoot / var / www / html /
Alias ​​"/ deploy /" "/ var / www / deploy /"

                Requires all warranty

Here are the folders:

[root@asd]# ls -lisaR / var / www / deploy /
/ var / www / deploy /:
4 in total
125 0 drwxr-xr-x 2 apache apache 23 Jan 9 13:20.
8887786 0 drwxr-xr-x 5 root 47 Jan 9 13:19 ..
148408 4 -rw-r - r-- 1 apache apache 19 Jan 9 13:17 index.php

I always get a 404 error.
The mistake says that:

Not Found The requested URL / deployment was not found on this server.

What is the meaning of alias in Python?


I look at the unit test infrastructure code (ref. Https:// and see many aliases like the following:

assertEqual = assertEquals = failUnlessEqual

assertNotEqual = assertNotEquals = failIfEqual

assertAlmostEqual = assertAlmostEquals = failUnlessAlmostEqual

assertNotAlmostEqual = assertNotAlmostEquals = failIfAlmostEqual

assertRaises = failUnlessRaises

assert_ = assertTrue = failUnless

assertFalse = failIf

I wonder what the useful feature of using aliases might be.

Normally, I avoid aliases because they are hard to debug and reduce the readability of code.

postgresql – Postgres – Using an alias for subquery projections in a "FROM clause" on a "WHERE clause" does not work

For example, if you have a table to store users of your application, call these users with the two fields "ID" and "E-mail."

Select the ID and send it by e-mail
from (
Select ID, send e-mail
of users
where electronic_mail = & # 39; & # 39;

Postgres complain that

ERROR: column "electronic_mail" does not exist

Disclaimer: This example is deliberately simple and stupid, just to indicate the problem that arises. You can imagine that I have to think through a json column. I think an array of complex elements to get a single scalar value of each. (I can share some code if you want to see it).

This is quite strange for me, because I really do not understand what the complication would be, probably something is not aware of me. As far as I work with Postgres, the alias columns can be easily used in a where clause.

nginx – redirection cycle when using an alias

I'm trying to set up a home web server.

My folder structure looks like this:

/ home / pi / www /
├── homeGUI
├── ├── backend / * Contains an express server that monitors 8080 * /
│ ├── Frontend / * Contains an Angular application * /
.Html │ ├── index.html
* │ └── / * Other .js files * /
└── └── scripts
└── index.html

while my site configuration is this:

listen 80;
listen [::]: 80;

root / home / pi / www;

index index.html index.htm;

Server name _;

# wanted to serve the angle application
location / homeGUI / {
Alias ​​/ home / pi / www / homeGUI / frontend /;
try_files $ uri $ uri / /homeGUI/frontend/index.html; #This causes problems

# Intends to deploy the files in the www folder
Location / {
try_files $ uri $ uri / index.html;

# Intended to serve the Express server
location / homeGUI / api / {

The above configuration can cover all 3 contents (static index.html, the angle application and the express server).

The problem I have is when I navigate directly to a route of the angle application (or by updating the page on that route) (it: localhost / homeGUI / route1) This results in a redirection cycle as it attempts to redirect to /homeGUI/frontend/index.html, which then falls into the same site rule and cycle.

All I want to accomplish is to redirect each request / homeGUI / * to the /home/pi/www/homeGUI/frontend/index.html File except for / homeGUI / api which should go to the express server on port 8080.

Every help is appreciated.
Many Thanks.

redirect – Restricts access to the system path for nodes, but preserves the alias of the URL

I'm using URL aliases on my Drupal 8 page.
Example: Alias ​​is | The normal system path is

How can I restrict access to the system path for normal users and bots (problem with duplicate content for SEO)?
I just want them to see the content in views or the URL alias, but I do not want to access the node path except me. I'm missing a configuration, because this should be a simple task, right?

I installed the redirect module, but it did not seem to solve my problem.

Thank you for your help.

Powershell alias for opening a file on the hard disk

I often store useful information in a file called on my Windows 10 computer. However, if the file is not open, it is difficult to navigate to the folder containing the file in the powershell and then open it.

Can I make a command, we say OpenScraps that opens in the Emacs editor?

In Bash, I would have made an alias aka openscraps = "emacs / "

Is there a way to define a common alias on both Windows and Linux (Windows-bash or cygwin)?

I use "Windows Command Shell" and "Bash Shell" in the Windows system.
What really annoys me, I have to define an alias for each (doskey & alias), even if I use the same command and folder.

So I'd like to know how to define a common definition that works in both shells. My idea is that …
1. Define the definition text file
2. read it and define "doskey in command" and "alias in shell"

Is there any preparation for this?

1. Define a common definition text file (common-define.txt).

"SET" "DIR_PROGRAM" D:  OneDrive  _MyProgram "
"CD" "dev" "D:  OneDrive  _MyProgram"
"ALIAS" "tt" "tt.bat"
  1. Read it and define "doskey in command" and "alias in shell" (autoload-batch.bat).

    FOR / f "tokens = 1,2,3 * delims =" %% A IN (common.define.txt)
    ) DO (
    if "%% ~ A" == "###" Echo %% A, %% B, %% C
    If "%% ~ A" == "SET" is set, set %% ~ B = %% ~ C
    if "%% ~ A" == "SETX" setx %% ~ B %% ~ C
    If "%% ~ A" == "CD" echo @doskey %% ~ B = cd / d %% ~ C >> gen_doskey.cmd
    if "%% ~ A" == "ALIAS" echo @doskey %% ~ B = %% ~ C $ * >> gen_doskey.cmd

reg add "hkcu software microsoft command processor" / v Autorun / t reg_sz / d% ~ dp0 gen_doskey.cmd / f

This is Windows version. and I am working on the Linux version.
What I think about it, is there a good way to do it?

Media: URL alias, how to go directly to the file?

So I activated the media module and added some PDFs. Difficulty trying to link the files from one page.

It works.

However, I want the client to be able to specify a simple link with a URL alias (eg: / files / account-disclosure). If I use URL alias, I'll go to a Drupal page with the link to the document instead. I would like to download the PDF file directly. Is that possible? Let me know steps.