mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Add FAQ about using a proxy (#11933)
This commit is contained in:
parent
b0ec0f96ad
commit
70927f728e
3 changed files with 130 additions and 35 deletions
|
@ -1232,20 +1232,12 @@ environment variable if you use Vagrant or VirtualBox and experience issues with
|
|||
being found during installation even though they should be present.
|
||||
|
||||
### http_proxy or HTTP_PROXY
|
||||
### HTTP_PROXY_REQUEST_FULLURI
|
||||
### HTTPS_PROXY_REQUEST_FULLURI
|
||||
### no_proxy or NO_PROXY
|
||||
|
||||
If you are using Composer from behind an HTTP proxy, you can use the standard
|
||||
`http_proxy` or `HTTP_PROXY` env vars. Set it to the URL of your proxy.
|
||||
Many operating systems already set this variable for you.
|
||||
|
||||
Using `http_proxy` (lowercased) or even defining both might be preferable since
|
||||
some tools like git or curl will only use the lower-cased `http_proxy` version.
|
||||
Alternatively you can also define the git proxy using
|
||||
`git config --global http.proxy <proxy url>`.
|
||||
|
||||
If you are using Composer in a non-CLI context (i.e. integration into a CMS or
|
||||
similar use case), and need to support proxies, please provide the `CGI_HTTP_PROXY`
|
||||
environment variable instead. See [httpoxy.org](https://httpoxy.org/) for further
|
||||
details.
|
||||
See the [proxy documentation](faqs/how-to-use-composer-behind-a-proxy.md) for more details
|
||||
on how to use proxy env vars.
|
||||
|
||||
### COMPOSER_AUDIT_ABANDONED
|
||||
|
||||
|
@ -1264,32 +1256,10 @@ in performance gains.
|
|||
Set to `4` or `6` to force IPv4 or IPv6 DNS resolution. This only works when the
|
||||
curl extension is used for downloads.
|
||||
|
||||
### HTTP_PROXY_REQUEST_FULLURI
|
||||
|
||||
If you use a proxy, but it does not support the request_fulluri flag, then you
|
||||
should set this env var to `false` or `0` to prevent Composer from setting the
|
||||
request_fulluri option.
|
||||
|
||||
### HTTPS_PROXY_REQUEST_FULLURI
|
||||
|
||||
If you use a proxy, but it does not support the request_fulluri flag for HTTPS
|
||||
requests, then you should set this env var to `false` or `0` to prevent Composer
|
||||
from setting the request_fulluri option.
|
||||
|
||||
### COMPOSER_SELF_UPDATE_TARGET
|
||||
|
||||
If set, makes the self-update command write the new Composer phar file into that path instead of overwriting itself. Useful for updating Composer on a read-only filesystem.
|
||||
|
||||
### no_proxy or NO_PROXY
|
||||
|
||||
If you are behind a proxy and would like to disable it for certain domains, you
|
||||
can use the `no_proxy` or `NO_PROXY` env var. Set it to a comma separated list of
|
||||
domains the proxy should *not* be used for.
|
||||
|
||||
The env var accepts domains, IP addresses, and IP address blocks in CIDR
|
||||
notation. You can restrict the filter to a particular port (e.g. `:80`). You
|
||||
can also set it to `*` to ignore the proxy for all HTTP requests.
|
||||
|
||||
### COMPOSER_DISABLE_NETWORK
|
||||
|
||||
If set to `1`, disables network access (best effort). This can be used for debugging or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue