AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-142064

Marc's questions

Martin Hope
Marc
Asked: 2023-11-18 18:47:50 +0800 CST

Ligação de host conf padrão do Apache

  • 6

Eu tenho uma instalação padrão do Apache2 no Ubuntu à qual adicionei mysite1.com com o seguinte:

 <VirtualHost mysite1.com:80>

Desde essa adição, quando eu ligo, http://<external-ip>não consigo mais configurar o site padrão do Apache em /etc/apache2/sites-enabled/000-default.conf:

 <VirtualHost *:80>

Por que está http://<external-ip>vinculado a mysite.com?

Quero que todos os cabeçalhos não configurados Host:atinjam o padrão e <external-ip>, IMO, não estejam configurados.

ATUALIZAÇÃO: A solução fornecida por @Daniel Ferradal é usar apenas curingas em todos os <VirtualHost *:80>blocos e empregar ServerNamediretivas para fazer mapeamento de nomes de host.

apache2
  • 1 respostas
  • 52 Views
Martin Hope
Marc
Asked: 2019-11-12 04:16:39 +0800 CST

Não é possível parar o serviço nginx

  • 0

Temos o nginx em execução (na porta 8080) no systemd, CentOS 7.7mas não conseguimos pará-lo - não há erro, ele continua executando ou reaparecendo.

Nós tentamos sudo systemctl stope sudo systemctl disableaté killmas continua funcionando.

Nov 11 13:04:18 myhost systemd[1]: Started The Gateway - Nginx.
[myuser@myhost gateway]$ sudo systemctl stop gateway
[myuser@myhost gateway]$ sudo systemctl status gateway
gateway.service - The Gateway - Nginx
   Loaded: loaded (/usr/lib/systemd/system/gateway.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2019-11-11 13:04:18 CET; 6min ago
  Process: 20988 ExecStart=/usr/sbin/nginx -c /prg/nginx/conf/gateway.conf (code=exited, status=0/SUCCESS)
  Process: 20985 ExecStartPre=/usr/sbin/nginx -t -c /prg/nginx/conf/gateway.conf (code=exited, status=0/SUCCESS)
  Process: 20983 ExecStartPre=/usr/bin/rm -f /daten/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 20988 (code=exited, status=0/SUCCESS)
    Tasks: 2
   Memory: 1.6M
   CGroup: /system.slice/gateway.service
           ├─20990 nginx: master process /usr/sbin/nginx -c /prg/nginx/conf/gateway.conf
           └─20991 nginx: worker process

Nov 11 13:04:18 myhost systemd[1]: Starting The Gateway - Nginx...
Nov 11 13:04:18 myhost node-gateway[20985]: nginx: the configuration file /prg/nginx/conf/gateway.conf syntax is ok
Nov 11 13:04:18 myhost node-gateway[20985]: nginx: configuration file /prg/nginx/conf/gateway.conf test is successful
Nov 11 13:04:18 myhost systemd[1]: Started The Gateway - Nginx.

Desabilitar e parar

[myuser@myhost gateway]$ sudo systemctl disable gateway
Removed symlink /etc/systemd/system/multi-user.target.wants/gateway.service.
[myuser@myhost gateway]$ sudo systemctl stop gateway

Ainda correndo

[myuser@myhost gateway]$ sudo systemctl status gateway
gateway.service - The Gateway - Nginx
   Loaded: loaded (/usr/lib/systemd/system/gateway.service; disabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2019-11-11 13:04:18 CET; 6min ago
 Main PID: 20988 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/gateway.service
           ├─20990 nginx: master process /usr/sbin/nginx -c /prg/nginx/conf/gateway.conf
           └─20991 nginx: worker process

Nov 11 13:04:18 myhost systemd[1]: Starting The Gateway - Nginx...
Nov 11 13:04:18 myhost node-gateway[20985]: nginx: the configuration file /prg/nginx/conf/gateway.conf syntax is ok
Nov 11 13:04:18 myhost node-gateway[20985]: nginx: configuration file /prg/nginx/conf/gateway.conf test is successful
Nov 11 13:04:18 myhost systemd[1]: Started The Gateway - Nginx.
[myuser@myhost gateway]$ ps -auxf | grep nginx
myuser    21846  0.0  0.0 112684   696 pts/0    S+   13:11   0:00  |           \_ grep --color=auto nginx
root      20990  0.0  0.0  59080  1388 ?        Ss   13:04   0:00 nginx: master process /usr/sbin/nginx -c /prg/nginx/conf/gateway.conf
nginx     20991  0.0  0.0  61272  2708 ?        S    13:04   0:00  \_ nginx: worker process
[myuser@myhost gateway]$ sudo lsof -i -P -n | grep 8080
node       1313              root   20u  IPv4 429747      0t0  TCP 127.0.0.1:51580->127.0.0.1:8080 (ESTABLISHED)
node       1313              root   21u  IPv4 432203      0t0  TCP 127.0.0.1:51640->127.0.0.1:8080 (ESTABLISHED)
node       1316 serviceuser   19u  IPv4 332198      0t0  TCP 172.25.24.45:57328->172.25.24.20:8080 (ESTABLISHED)
node       1316 serviceuser   21u  IPv4 318233      0t0  TCP 172.25.24.45:57260->172.25.24.20:8080 (ESTABLISHED)
nginx     20990              root    6u  IPv4 430360      0t0  TCP *:8080 (LISTEN)
nginx     20991             nginx    3u  IPv4 430473      0t0  TCP 127.0.0.1:8080->127.0.0.1:51580 (ESTABLISHED)
nginx     20991             nginx    6u  IPv4 430360      0t0  TCP *:8080 (LISTEN)
nginx     20991             nginx   25u  IPv4 432204      0t0  TCP 127.0.0.1:8080->127.0.0.1:51640 (ESTABLISHED)
nginx
  • 1 respostas
  • 1692 Views
Martin Hope
Marc
Asked: 2019-10-10 10:45:08 +0800 CST

Proxy Pass com valor de cookie na URL

  • 1

Eu quero passar por proxy uma solicitação para /foo/XXX/baronde XXXestá o valor do mycookiecookie na solicitação.

Isso é trivial no Nginx, mas não encontrei nenhuma maneira no Apache HTTPD:

Solução Nginx

location ~ ^/foo/bar {
    proxy_pass http://localhost/foo/$cookie_cust/bar$is_args$args;
    proxy_set_header X-Forwarded-For $remote_addr;
}

Como posso ProxyPasscom um valor de cookie específico no Apache 2.4?

apache-2.4
  • 1 respostas
  • 571 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve