Я пытаюсь использовать сокет unix с apache 2.4.10 и все время получаю сообщение об ошибке No protocol handler was valid for the URL /foo.
у меня есть mod_proxy_uwscgi
установлен и включен.
Мой виртуальный хост выглядит так:
<VirtualHost *:80>
ServerAdmin me@example.com
ServerName foo.example.com
<Location />
ProxyPass unix:/path/to/socket.sock|uwscgi://
</Location>
</VirtualHost>
Выход apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
headers_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php5_module (shared)
proxy_module (shared)
proxy_ajp_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
proxy_uwsgi_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)
Я не понимаю, что делаю не так.
У вас опечатка. Это не uwscgi, это uwsgi.
Из Документы UWSGI:
Начиная с Apache 2.4.9 добавлена поддержка сокетов Unix. Синтаксис довольно прост:
ProxyPass / unix:/var/lib/uwsgi/app1.sock|uwsgi://uwsgi-uds-app1/
ProxyPass / unix:/var/lib/uwsgi/app2.sock|uwsgi://uwsgi-uds-app2/
Я думаю, вам может понадобиться следующая строка вместо того, что у вас есть сейчас: ProxyPass uwscgi://path/to/socket.sock
Помимо всего прочего, пути unix / uwscgi предоставляются как URI, которые должны иметь форму PROTOCOL: // PATH. Если PATH - канонический путь, у вас будет, например, unix: /// dev / null.