小编Dmy*_*nko的帖子

默认网关在不同的子网中。如何在RHEL6.2中配置

我有两个子网从 ISP 路由到我的服务器。我只有一个网关ip。网关与我的 IP 地址位于同一 VLAN 中。例如,网络 1 是 1.0.0.0/24,网络 2 是 2.0.0.0/24。两者都由我的 ISP 路由到 eth0。网关是 1.0.0.1。我的主机 ip 是 2.0.0.1/24 (eth0) 所以我可以手动配置默认网关

ip route add default dev eth0
ip route add default via 1.0.0.1
Run Code Online (Sandbox Code Playgroud)

然后互联网连接正常工作。如何在 /etc/sysconfig/network-scripts/ifcfg-eth0 中配置它?

我试图设置 GATEWAY=1.0.0.1 但它不起作用。试图在 /etc/sysconfig/network 中设置 GATEWAY 和 GATEWAYDEV,它只执行上面列表中的第一个命令。

networking linux rhel6

4
推荐指数
1
解决办法
1万
查看次数

无法让 nginx 缓存工作

我主要有简单的 nginx 配置。我无法让缓存工作

http {
...
server_tokens                   off;
proxy_hide_header               X-Powered-By;
fastcgi_hide_header             X-Powered-By;
client_header_timeout           1024;
client_body_timeout             1024;
send_timeout                    9000;
proxy_read_timeout              4000;
connection_pool_size            256;
client_header_buffer_size       1k;
client_max_body_size            10m;
large_client_header_buffers     2 4k;
request_pool_size               4k;
proxy_buffers                   8 32k;
proxy_buffering                 off;
proxy_buffer_size               32k;
server_names_hash_bucket_size   64;
output_buffers                  3 16k;
postpone_output                 1460;
sendfile                        off;
tcp_nopush                      on;
tcp_nodelay                     on;
keepalive_timeout               30 100;
ignore_invalid_headers          off;
log_format custom '$host $uri $remote_addr [$time_local] $status $bytes_sent [$request]';

proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=melco:500m inactive=15m max_size=1000m;
proxy_temp_path /var/cache/nginx/temp;
...

server {
.....
location = /rss.php …
Run Code Online (Sandbox Code Playgroud)

nginx

3
推荐指数
1
解决办法
3658
查看次数

标签 统计

linux ×1

networking ×1

nginx ×1

rhel6 ×1