Home >Operation and Maintenance >Linux Operation and Maintenance >How to set up HTTP proxy for users on Linux
To improve security, most organizations, companies, and institutions use proxy servers on the network to access the Internet. Using a proxy server, you can limit each user's access level as needed. In this article, we will explain how to enable HTTP proxy for users in Linux with only terminal access.
Enable HTTP Proxy
Log in to the user on the Linux system for which you want to enable HTTP proxy. Now edit the .bashrc or .bash_profile file in your home directory and append the following lines at the end of the file.
Anonymous proxy
http_proxy = http://10.0.0.2:8080 export no_proxy = localhost,127.0.0.1 export http_proxy
For authenticated proxy
http_proxy=http://proxyuser:password@10.0.0.2:8080 export no_proxy=localhost,127.0.0.1 export http_proxy
You can now save the file and reload the configuration using the following commands document. Or you can simply log out and log back into the terminal to enable the settings.
$ source~ / .bashrc $ source~ / .bash_profile
This article has ended here. For more other exciting content, you can pay attention to the Linux Tutorial Video column of the PHP Chinese website! ! !
The above is the detailed content of How to set up HTTP proxy for users on Linux. For more information, please follow other related articles on the PHP Chinese website!