google.comへのリバースプロキシをつくってみたいと思いました。
そこで下記記事を参考に設定しましたがうまくいかないため質問させていただきます。
https://www.server-world.info/query?os=CentOS_6&p=squid&f=4
squidを起動したところ以下のようなエラーがでました。エラー内容は検索してもそれらしいものは出てきませんでした。
2018/10/06 00:02:48| FATAL: http_port: defaultsite option requires Acceleration mode flag. FATAL: Bungled /etc/squid/squid.conf line 67: http_port 80 defaultsite=10.0.0.31 Squid Cache (Version 3.5.20): Terminated abnormally. CPU Usage: 0.011 seconds = 0.005 user + 0.006 sys Maximum Resident Size: 29792 KB Page faults with physical i/o: 0
etc/squid/squid.confの内容は以下の通りです。
OSはcentos7です。
原因の切り分けや解決策が分かる方いましたらご教示お願い致します。
また、リバースプロキシの設定記事で以下のようなものもありましたが先ほど貼ったサイトとは設定が異なりますね。
https://squid.robata.org/ReverseProxy_top.html
# Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager # We strongly recommend the following be uncommented to protect innocent # web applications running on the proxy server who think the only # one who can access services on "localhost" is a local user #http_access deny to_localhost # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # # Example rule allowing access from your local networks. # Adapt localnet in the ACL section to list your (internal) IP networks # from where browsing should be allowed http_access allow localnet http_access allow localhost # And finally deny all other access to this proxy http_access allow all http_access deny all # Squid normally listens to port 3128 ###############追記部分####################### http_port 80 defaultsite=183.77.109.39 ############################################# # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /var/spool/squid 100 16 256 # Leave coredumps in the first cache dir coredump_dir /var/spool/squid # # Add any of your own refresh_pattern entries above these. # refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|?) 0 0% 0 refresh_pattern . 0 20% 4320 #######################ここが追記部分##################### cache_mem 256 MB cache_peer 183.77.109.39 parent 80 0 no-query originserver visible_hostname prox.srv.world ########################################################

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/10/06 02:31