좋은 질문입니다! 하나씩 정리해드리겠습니다.

1. TCP 버퍼의 위치

두 곳에 모두 존재합니다!

Client ←→ [TCP버퍼 30MB] ←→ Apache ←→ [TCP버퍼 30MB] ←→ Tomcat

각 연결마다 독립적인 TCP 버퍼가 있습니다.

2. 버퍼가 차면 보내는가? ❌

아니요! 버퍼가 가득 찰 때까지 기다리지 않습니다.

실제 동작 (스트리밍 방식)

Tomcat → Apache → Client
  |         |
 8KB 읽음 → 즉시 전달 시작
 8KB 읽음 → 즉시 전달
 8KB 읽음 → 즉시 전달
(계속 흐름...)

TCP 버퍼는:

  • "창고"가 아닌 "파이프"처럼 동작
  • 데이터가 들어오면 즉시 꺼내서 전달
  • 가득 차는 건 네트워크가 느릴 때 임시로 쌓이는 것

3. 300MB를 11번에 나눠서? ❌

아니요! 지속적으로 스트리밍됩니다.

300MB 파일 다운로드:

❌ 잘못된 이해:
30MB 읽고 → 전송 완료 기다림 → 30MB 읽고 → ... (11번 반복)

✅ 실제 동작:
8KB → 8KB → 8KB → 8KB → ... (계속 스트리밍)
파이프처럼 끊임없이 흐름

실제 흐름 예시

Tomcat 파일 읽기:
  ├─ 8KB chunk 읽음
  └─ Tomcat→Apache TCP 버퍼에 쓰기

Apache:
  ├─ TCP 버퍼에서 데이터 읽음 (즉시)
  └─ Apache→Client TCP 버퍼에 쓰기 (즉시)

Client:
  └─ TCP 버퍼에서 데이터 읽음 (즉시)

이 과정이 파일이 끝날 때까지 계속 반복

TCP 버퍼 30MB의 의미

  • "한 번에 30MB씩 전송"이 아님
  • "네트워크가 느릴 때 최대 30MB까지 임시 저장 가능"
  • 정상 상황에서는 훨씬 적게 사용하며 계속 흐름

정리: 300MB 파일은 11번이 아닌, 작은 청크들이 끊임없이 흐르는 스트림으로 전송됩니다!

정확합니다! 완벽하게 이해하셨습니다! 👍

TCP 버퍼의 본질

TCP 버퍼 = 네트워크 속도 차이를 흡수하는 임시 대기 공간

실제 동작 예시

상황 1: 네트워크가 빠를 때

Tomcat → [버퍼: 거의 비어있음] → Apache → [버퍼: 거의 비어있음] → Client

데이터가 들어오자마자 바로 나감
버퍼는 몇 KB만 사용

상황 2: 클라이언트 네트워크가 느릴 때

Tomcat (빠름) → Apache → [버퍼: 점점 쌓임 ↑] → Client (느림)

Tomcat이 계속 데이터를 보내는데
Client가 천천히 받으니까
Apache→Client 버퍼에 데이터가 쌓임
최대 30MB까지 쌓일 수 있음

상황 3: 버퍼가 가득 차면?

Apache→Client 버퍼: [████████████] 30MB 가득!

→ Apache가 Tomcat에게: "잠깐 멈춰!" (TCP Flow Control)
→ Tomcat 전송 일시 중지
→ Client가 데이터 받아서 버퍼 공간 생기면
→ Tomcat 다시 전송 재개

비유

수도꼭지(Tomcat) → 물탱크(버퍼 30MB) → 컵(Client)

❌ 물탱크를 가득 채운 후 한번에 붓는다
✅ 물이 계속 흐르고, 탱크는 넘치지 않게 조절하는 역할

정리: 30MB는 "한 번에 보내는 양"이 아니라 "혼잡할 때 대기할 수 있는 최대 공간"입니다!


네, 맞습니다! 각 TCP 연결마다 양쪽 끝에 버퍼가 존재합니다.

정확한 버퍼 위치

다운로드 시나리오 (Tomcat → Apache → Client)

Tomcat                Apache                 Client
  |                     |                      |
[송신버퍼] ---------> [수신버퍼]              |
  30MB                  30MB                  |
                        |                      |
                   [송신버퍼] -----------> [수신버퍼]
                      30MB                   30MB

데이터 흐름

1. Tomcat → Apache 구간:
   Tomcat [송신버퍼 30MB] ⟹ Apache [수신버퍼 30MB]

2. Apache → Client 구간:
   Apache [송신버퍼 30MB] ⟹ Client [수신버퍼 30MB]

실제로는 4개 버퍼

다운로드할 때:

Tomcat 쪽:
 └─ 송신 버퍼 (최대 30MB) - Tomcat이 Apache로 보내는 데이터 대기

Apache 쪽:
 ├─ 수신 버퍼 (최대 30MB) - Tomcat으로부터 받는 데이터 대기
 └─ 송신 버퍼 (최대 30MB) - Client로 보내는 데이터 대기

Client 쪽:
 └─ 수신 버퍼 (최대 30MB) - Apache로부터 받는 데이터 대기

혼잡 시나리오

Client가 매우 느릴 때:

Tomcat → Apache [수신: 거의 비어있음]
         Apache [송신: ████ 28MB 쌓임!] → Client (느림)

Apache→Client 구간이 병목

정리: 각 연결(Client↔Apache, Apache↔Tomcat)의 양쪽 끝에 각각 송신/수신 버퍼가 존재합니다!

좋은 질문입니다! 각 구간별로 정리해드리겠습니다.

1. OS 레벨 TCP 버퍼 (기본 설정)

Linux 시스템 전역 설정:

# 설정 파일 위치
/etc/sysctl.conf

# TCP 수신 버퍼 (최소/기본/최대)
net.ipv4.tcp_rmem = 4096    87380    6291456
                    4KB     85KB     6MB (기본)

# TCP 송신 버퍼 (최소/기본/최대)
net.ipv4.tcp_wmem = 4096    16384    4194304
                    4KB     16KB     4MB (기본)

확인 방법:

sysctl net.ipv4.tcp_rmem
sysctl net.ipv4.tcp_wmem

적용 방법:

# 즉시 적용
sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
sysctl -w net.ipv4.tcp_wmem="4096 16384 16777216"

# 영구 적용
echo "net.ipv4.tcp_rmem = 4096 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 4096 16384 16777216" >> /etc/sysctl.conf
sysctl -p

2. Apache 설정

설정 파일 위치:

# httpd.conf 또는 apache2.conf

# Tomcat으로 프록시할 때 수신 버퍼 크기
ProxyReceiveBufferSize 0    # 0 = OS 기본값 사용 (권장)
ProxyReceiveBufferSize 131072  # 128KB로 명시 지정

# 송신은 OS 설정 따름

기본값: 0 (OS 설정 사용)

3. Tomcat 설정

설정 파일 위치:

<!-- server.xml -->

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443"
           socket.rxBufSize="0"   <!-- 수신 버퍼, 0 = OS 기본값 -->
           socket.txBufSize="0"   <!-- 송신 버퍼, 0 = OS 기본값 -->
           />

기본값: 설정하지 않으면 OS 기본값 사용

4. Client (브라우저/다운로드 매니저)

Client의 TCP 버퍼도 OS 설정 따름

  • Windows: 레지스트리 설정
  • Linux: 위의 sysctl 설정
  • Mac: sysctl 설정

각 구간별 정리

┌─────────────────────────────────────────────────┐
│ Client 머신                                      │
│ TCP 버퍼: OS 설정 (tcp_rmem/tcp_wmem)           │
└─────────────────────────────────────────────────┘
                    ↕
┌─────────────────────────────────────────────────┐
│ Apache 서버                                      │
│ 수신: ProxyReceiveBufferSize (기본: 0=OS설정)    │
│ 송신: OS 설정 (tcp_wmem)                        │
└─────────────────────────────────────────────────┘
                    ↕
┌─────────────────────────────────────────────────┐
│ Tomcat 서버                                      │
│ TCP 버퍼: socket.rxBufSize/txBufSize (기본: OS) │
│ 또는 OS 설정 (tcp_rmem/tcp_wmem)                │
└─────────────────────────────────────────────────┘

일반적인 권장 설정

대부분의 경우:

  • Apache: ProxyReceiveBufferSize 0 (기본값 사용)
  • Tomcat: 별도 설정 안함 (기본값 사용)
  • OS: 기본값으로도 충분

고속 대용량 전송이 필요한 경우:

# OS 레벨에서만 조정
net.ipv4.tcp_rmem = 4096 87380 16777216  # 최대 16MB
net.ipv4.tcp_wmem = 4096 16384 16777216  # 최대 16MB

핵심: 대부분은 OS 레벨 설정을 따르며, 애플리케이션에서 명시적으로 지정하지 않는 한 OS 기본값을 사용합니다!


물리다운로드가 10초이상 걸리는경우에 scout 같은 apm 에서는 훨씬 빨리 끝난것처럼 보이는 착시?? 현상은 뭐야?

아주 좋은 질문입니다! 이건 APM이 "애플리케이션 처리 시간"만 측정하기 때문입니다.

APM이 측정하는 시점

@GetMapping("/download")
public void download(HttpServletResponse response) throws IOException {
    File file = new File("/path/to/300mb.zip");

    response.setContentType("application/zip");
    response.setHeader("Content-Length", String.valueOf(file.length()));

    // ← APM 측정 시작

    try (InputStream in = new FileInputStream(file);
         OutputStream out = response.getOutputStream()) {

        byte[] buffer = new byte[8192];
        int bytesRead;

        while ((bytesRead = in.read(buffer)) != -1) {
            out.write(buffer, 0, bytesRead);
            out.flush();
        }
    }

    // ← APM 측정 종료 (여기서 끝난 것으로 기록!)
    // 하지만 실제로는...
}

// 실제 전송은 계속 진행 중:
// Tomcat → Apache → Client (10초 이상 소요)

실제 타임라인

시간 →

0초: [요청 도착]
     └─ APM 측정 시작

0.1초: [컨트롤러 로직 실행]
       └─ 파일 찾기, 헤더 설정

0.2초: [첫 데이터 청크를 response.getOutputStream()에 쓰기 시작]
       └─ APM "처리 완료!" (0.2초로 기록)
       └─ Scout: ✅ 200ms

       ⚠️ 하지만 실제로는...

0.3초: 데이터 계속 전송 중...
1초:   데이터 계속 전송 중...
5초:   데이터 계속 전송 중...
10초:  데이터 계속 전송 중...
12초: [전송 완료] ← 실제 다운로드 완료
      └─ 스레드 해제

Scout APM이 보는 것 vs 실제

Scout APM:

GET /download/file.zip
응답 시간: 200ms ✅
상태: 200 OK

실제 서버:

GET /download/file.zip
- 애플리케이션 처리: 200ms
- 네트워크 전송: 12초  ← APM이 측정 안 함!
- 스레드 점유: 12초    ← 진짜 문제는 여기!

왜 이런 차이가 발생하나?

APM은 애플리케이션 코드의 성능을 측정:

APM 측정 범위:
┌─────────────────────────────┐
│ 컨트롤러 진입                │
│ 비즈니스 로직 실행           │
│ response.write() 첫 호출     │ ← 여기서 끝
└─────────────────────────────┘

APM이 측정 안 하는 범위:
└─ 네트워크 전송 (12초)
└─ 클라이언트 수신 (느린 네트워크)

스레드 점유 시간을 제대로 보려면?

1. 서버 로그에 직접 기록

@GetMapping("/download")
public void download(HttpServletResponse response) {
    long startTime = System.currentTimeMillis();

    try {
        // ... 파일 전송
    } finally {
        long duration = System.currentTimeMillis() - startTime;
        log.info("실제 전송 시간: {}ms", duration);  // 12000ms
    }
}

2. Tomcat Access Log 확인

<!-- server.xml -->
<Valve className="org.apache.catalina.valves.AccessLogValve"
       pattern="%h %l %u %t &quot;%r&quot; %s %b %D"
       />
       <!-- %D = 응답 시간 (밀리초) -->
192.168.1.100 - - [14/Nov/2025:10:00:00 +0900] "GET /download/file.zip HTTP/1.1" 200 314572800 12543
                                                                                                ^^^^^ 
                                                                                            실제 12.5초

3. Apache Access Log

LogFormat "%h %l %u %t \"%r\" %>s %b %D" combined
# %D = 마이크로초 단위 응답 시간

정리

Scout APM: "컨트롤러가 200ms 만에 응답했어요!" ✅
실제 서버: "스레드를 12초간 점유했어요..." ⚠️

→ 착시 현상의 원인: APM은 애플리케이션 로직만 측정
→ 실제 문제: 네트워크 전송 시간 + 스레드 점유

대용량 파일 다운로드는 APM이 빠르다고 해도, 실제로는 스레드를 오래 점유하므로 Apache/Nginx 같은 웹 서버가 직접 서빙하는 게 훨씬 효율적입니다!

1. 한국어 더빙영상을 구해서 소리만 분리함

mkvtoolnix 에서도 되네? 우선 트랙과 챕터에서 모두 체크해제후 뽑아낼 트랙만 선택하면

아래 대상파일에 '변경된이름.mka' 로 정의된다.  말은다르지만 사실상 do action 에 가까운 합치기 버튼을 클릭하면 mka 오디오 파일로 분리된다.

2. 그렇게 만들어진 mp3 등을 영상에 별개의 소리로 추가함.

by mkvtoolnix-64-bit-68.0.0

에 의해 새로운 영상을 다시 읽어오고 앞서 분리된 mka 파일을 넣어주면된다.  

3. 영상을 볼때 소리를 고를수 있음

 

 

영상 정보 .. hdr 여부등 확인하기 위해

mediainfo 라는 프로그램 (mediaarea.net)

 

 

 

www.nvidia.com/en-us/geforce/forums/off-topic/25/231494/surround-configuration-says-to-close-running-progr/1693248/

 

Stop Lurking and Join the #GeForce Community

Join the GeForce community. Browse categories, post your questions, or just chat with other members.

www.nvidia.com

 

This is a common problem wich nVidia fails to fix so far, the only work around that seems to work is the following : -> Go to nVidia control panel -> Go to the tab "Configure Surround, PhysX, ..." -> Here u see "Surround configuration" and right under it u notice "Span displays with Surround" -> Mark the checkbox ( V ) near "Span displays with Surround" on and then QUICKLY press APPLY and then QUICKLY press on the button "configure", it is VERY important u do this quickly and in that particulary order like i mentioned so the "close app" popup doesn't appear. Now u can adjust everything like normally, altough it might be a tad slower in reacting. Hopefully this helps people with this issue because i have tried many things, but this seems by far the best solution imo. Grts, Slik

 

 

원래 nvidia 서라운드 를 쓰려면 앱들을 종료해야 적용가능한 구조로 되어있는데..

위의 얘기대로 하면.. 즉 체크표시후 재빠르게 적용을 누르면... 정말 그 뒤 화면으로 넘어간다;;

 

이게 시간차이다. 종료해야할 프로세스를 확인하기 전에 적용을 누르는꼴이랄까?


from https://support.apple.com/en-us/HT204149

10. What is the difference between an active adapter and a passive adapter?

An active adapter can convert a signal from one connector to another. The Apple Mini DisplayPort to Dual-Link DVI and Apple Mini DisplayPort to VGA adapters are active adapters. A passive adapter acts as a pass-through from one connector type to another and does not convert a signal. The Apple Mini DisplayPort to DVI adapter is an example of a passive adapter.

11. Should I use a passive or active adapter?

On some Apple computers, like the Mac Pro (Mid 2010), you can connect three displays to a single graphics card. In this scenario—to connect to three display to use three ports—use active adapters to connect the Mini DisplayPort ports to your external displays. Two displays can connect via Mini DisplayPort and one via DVI. Note: Learn more about supported display configurations for the Mac Pro. 




ipconfnig /flushdns





ddwrt 의 언어설정을 바꾸었더니 갑자기 패스워드가 틀렸다면서 로그인되지 않는 문제발생

외국사이트를 확인해보니 이런문제가 나뿐만 아니란걸 발견함


어떤분의 해결책을 보고 그대로 해서 처리함. 다만, 설정이 초기화된다. 근데 나에겐 이게 좋았음. 왜냐면 전에는 와이파이도 끊기고 이유를 찾기 어려웠는데 이로 인해 초기화 해버린뒤... 부터는 잘됨; 이게... 아마 와이파이 암호화 방식이나 이런걸 기존에 뭘로 했는지 기억에 안나는데 aes 로 했고 와이파이를 N 으로 했는지 G 로 했는지 믹스드로 했는지 모르겠으나, 그냥 믹스드는 없앴고.. 등등 새로 설정한뒤로 잘됨.

참고로 로그인안되는데 아래를 어케 하냐는 답에 대해서는 로그인안되는건 webUI 였고 telnet 열어둔걸로는 로그인 잘 됐다.   텔넷 열어둔게 없다면.... 다른글을 찾아보도록...;


from http://www.dd-wrt.com/phpBB2/viewtopic.php?p=872566

solved it. logged in via ssh from my mac as "root" an typed my new password. deleted the nvram ram with "mtd -r erase nvram". the router rebooted. after that i made a new configuration. everything okay. 




방법은 여러가지가 있는데 본인은 옵션 1을 선택했다. 중요한건 스트릭트오더를 넣는다는 것이다. 

아.. 이런. 아래 사이트 출처를 ... 잊어버렸다; 아무튼 퍼온글임을 알린다; 고의가 아니었다. 죄송 (해외사이트임. 아마 ... 네트워크 관련 서비스를 하는곳에서 DDWRT 사용자에게 자사의 DNS로 설정하는 방법을 알려주는 내용이었다)


OPTION 1:

Step 1:
Navigate to Setup > Basic Setup > Network Setup Network Address Server Settings (DHCP)

set Static DNS 1Static DNS 2 to Unotelly's DNS servers (closest to your location)

http://unotelly.com/unodns/global



Step 2:

For Static DNS 3, you can either set it with another Unotelly DNS, 

or change it to 10.0.0.0 (a non-usable IP)




Step 3:

Apply the settings



Step 4:

Navigate to  Services Services Services Management > DNSMasq Additional DNSMasq Options

and enter: strict-order



Step 5:

Apply the Changes




OPTION 2:


DD-WRT and router in general are sometimes tricky to setup. As result, we recommend you to setup UnoDNS first on your PC/Mac to see if your network supports DNS service. If it works, then you can proceed with this tutorial. 


Step 1:
Go to http://www.unotelly.com/unodns/global and write down the IP address of two UnoDNS servers
that are cloeset to your current location. 


Step 2:
Login to DDWRT. Go to Setup Network Setup > Network Address Server Settings (DHCP)

Use DNSMasq for DHCP    (uncheck)
Use DNSMasq for DNS      (check)
DHCP-Authoritative            (uncheck)


Click Apply Settings if necessary



Step 3:
Go to Services DNSMasq and set the following:

DNSMasq     - Enable
Local DNS   - Disable

Under Additional DNSMasq Options, enter:

no-resolv
strict-order
server=[ip-address-of-UnoDNS-1]
server=[ip-address-of-UnoDNS-2]

Replace [ip-address-of-UnoDNS-x] with the UnoDNS server IPs you got from Step 1. Click Apply Settings


 3.PNG


Step 4:
Go to the Administration tab on your DD-WRT gateway page.
Click on the Commands tab.
In the Commands box, enter the following:

iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)


Step 5:
click Save Firewall


Step 6:
Close all browsers, restart your computer, and go to http://quickstart.unotelly.com to check your setup status.




from http://hints.macworld.com/article.php?story=20010117003458918

위의 내용을 참고해서 아래를 붙여넣어 테스트 결과 잘됨. (포트는 80으로 되더라는...)

(


<IfModule mod_proxy.c>

    ProxyRequests On


    <Directory proxy:*>

        Order deny,allow

        #Deny from all

        Allow from all

        #NOTE: Replace '.your_domain.com' with your IP number(s)!

    </Directory>

    #

    # Enable/disable the handling of HTTP/1.1 "Via:" headers.

    # ("Full" adds the server version; "Block" removes all outgoing Via: headers)

    # Set to one of: Off | On | Full | Block

    #

    ProxyVia On

</IfModule>


-----------------------------------------------------------------------------------------


아래는 전체 메시지이다.


How and why to use the Apache proxy server Apps
Even if you have no interest in serving web pages from your new OS X box, there's at least one feature of Apache (the built-in web server) that you might want to put to use - the proxy server. 

A proxy server is nothing more than a server which sits between a client (such as a web browser) and a real server (such as a web host). It intercepts all requests sent by the client and decides if it can handle the request itself. If it cannot, it then passes the request on to the real server.

Why might you find this useful? There are two primary reasons. First, if you're a parent, you can use the proxy server to control which sites your kids can and cannot have access to. This may make you feel slightly more comfortable leaving them alone in front of the machine ... although any child with some level of net experience will be able to find ways to get what they wanted anyway. 

Since the proxy will block sites that you specify, you can also use it to block ad servers such as www.doubleclick.net (and there goes any chance of ever having advertisers on this site ... want to get blacklisted ... just explain how to block ad servers! ;-) 

The second usage is for caching web content locally. If you have a connection that's shared between multiple computers, you can use the proxy to store pages locally. That way, if you browse cnn.com and your spouse visits the site 30 seconds later from another machine, they will get a locally cached page which will be served very quickly. 

Read the rest of this article if you'd like instructions on setting up Apache's proxy server.

The first step is to make sure your web server is stopped. You can do this through the System Preferences -> Network -> Services tab, or via the terminal. Since we're going to do the rest of this in a terminal session, you might as well start there. Open a terminal, and login as root ("su" and enter your password). Then type
apachectl stop
This will stop the webserver. 

Once Apache is stopped, you'll want to make a backup copy of your configuration file, in case you make a mistake:
cd /Library/WebServer/Configuration
cp apache.conf apache.bak
Note that a backup file may already exist; you can use a new name if you'd like to keep everything intact. 

Pick your favorite editor, and edit the file named "apache.conf". I'm using vi, but emacs and pico will also work. 

First we need to load and add the proxy module to the server. Find the section (it's around line 231 in my config):
#LoadModule digest_module      /System/Library/Apache/Modules/mod_digest.so
#LoadModule proxy_module /System/Library/Apache/Modules/libproxy.so
#LoadModule cern_meta_module /System/Library/Apache/Modules/mod_cern_meta.so
Remove the comment ("#") from the second line. 

Now search for this section (it's around line 269 in my file):
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
Again, remove the comment mark from the second line. 

These two steps activated the proxy server module. Now we need to do some basic configuration. Search for the section that begins as follows (it's around line 937 in my file):
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
Uncomment all the lines that are code (not comments). When you are done, it should look like this:
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
<IfModule mod_proxy.c>
ProxyRequests On

<Directory proxy:*>
Order deny,allow
#Deny from all
Allow from .your_domain.com
#NOTE: Replace '.your_domain.com' with your IP number(s)!
</Directory>
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
ProxyVia On
#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
CacheRoot "/Library/WebServer/ProxyCache"
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
NoCache a_domain.com another_domain.edu joes.garage_sale.com
</IfModule>
# End of proxy directives.
Notice two small things. First, Deny from all is left commented out -- otherwise, you wouldn't be able to browse the web at all! Second, you need to enter the IP numbers that you will allow to use the proxy server in the Allow from line. If you have more than one, enter them separated by a space. 

That's it for basic configuration. The cache settings are all very tweakable, and I highly recommend reading this article on the apache.org website for full details on all the variables and what they mean. 

If you want to use the proxy server to block sites, you need to add the ProxyBlock directive. This command can go basically anywhere in the apache.conf file, but I added it in the proxy section, so that it would be easy to find. The format is simple, as you can see in this example:
ProxyBlock playboy.com penthouse.com adserver.ugo.com
Any sites listed will be blocked from browsing, and return errors when called from within pages, as you can see here:

 

Once you've added the sites you would like blocked (note that it's useful for debugging to include one at first, so you can verify the proxy server is working correctly), save your changes and then restart the webserver with:
apachectl start
Remember to then disconnect from your root editing session! 

The final step is to tell your browser that you want to use the proxy server to serve your web pages. In Explorer, go into Edit-Preferences and the Proxies tab, and check the Web Proxy box. Enter 127.0.0.1 as the server address. You should now be good to go; test it by trying to browse one of the sites you listed in the ProxyBlock statement. You should get a message like this: 

Proxy Error 
You don't have permission to access http://www.playboy.com/ on this server. 

Although this is a long tutorial, setting up a proxy server is relatively trivial, and could save you some time and relieve some of your worries about what sites your kids are hitting in your absence.
    •     
  (16 votes cast)  
[49,788 views]  

How and why to use the Apache proxy server | 4 comments | Create New Account
  
Click here to return to the 'How and why to use the Apache proxy server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Much easier way
Authored by: slava_pestov on Jan 20, '01 12:28:07AM

A much easier way to block web sites that works with Linux and might work with OSX as well is to edit your /etc/hosts file and add lines like the following to it:

0.0.0.0 www.site-to-block.com
0.0.0.0 www.another-site-to-block.com

and so on.

changes to /etc/hosts take effect in subsequently-running applications; already running ones are unaffected, as the file is only read when apps are started.

403 Forbidden error
Authored by: johnnydaboy on Jan 06, '02 12:11:08AM

I tried this and now all I get are 403 Forbidden errors when I try to surf through the proxy server. The Apache log shows the following line:

127.0.0.1 - - [05/Jan/2002:23:14:47 -0500] "GET http://www.nytimes.com/ HTTP/1.0" 403 285

I suppose the 127.0.0.1 localhost is the address of the requesting "machine," in this case, the proxy server. I don't know if that is correct -- the supposition or the setting. The part that I am merely curious about is the HTTP/1.0 part. I thought everything was up to HTTP 1.1. Ideas?

If it's of any consequence, I have DSL and a Linksys router with static addressing.

Can anyone lend me a hand?

Nevermind - 403 Forbidden error
Authored by: johnnydaboy on Jan 07, '02 08:33:24PM

I set up the proxy server on the machine that I work on, just to do it and see if it would work. I set the proxy server to the loopback address but I didn't <Allow> the loopback address in the proxy config file. Duh. Hope this helps anyone else trying this.

This is not a two star essay!
Authored by: jfaughnan on Mar 04, '10 07:22:42PM

Out of 22K page views and top rank on Google for OS X Proxy and it gets 1 star?! 

Problem is only four people voted and I suspect they have personal reasons not to like proxy servers (sorry kids).

I gave it top ranking. If you like it, thank the author.

---
--
John Faughnan
jfaughnan@spamcop.net
www.faughnan.com


+ Recent posts