XAMPP 아파치 서버 포트를 변경하는 방법은 무엇입니까?
이것은 내 Apache httpd.conf 설정입니다.
Listen 8012
ServerName localhost:8012
Apache를 시작할 때마다 XAMPP
다음 메시지가 표시됩니다.
Status Check OK
Busy…
Apache Started [Port 80]
누구든지 다른 설정을 변경할 수 있습니까?
원래 질문에 답하려면 :
XAMPP Apache 서버 포트 를 변경하려면 다음 절차를 따르십시오.
1. 사용 가능한 포트 번호 선택
Apache에서 사용하는 기본 포트는 80
.
Netstat ( XAMPP 제어판에 통합)로 사용 된 모든 포트 를 살펴보십시오 .
그럼 당신은 모든 사용되는 포트를 볼 수 있습니다 여기에 우리가 볼 80
포트가 이미 사용 에 의해 System
.
사용 가능한 포트 번호를 선택하십시오 ( 8012
이 예제의 경우).
2. " httpd.conf
" 파일 편집
이 파일에서 찾을 수 있어야
C:\xampp\apache\conf
에 윈도우 나에bin/apache
대한 리눅스 . :
Listen 80
ServerName localhost:80
다음으로 교체하십시오.
Listen 8012
ServerName localhost:8012
파일을 저장하십시오.
액세스 : http : // localhost : 8012 가 작동하는지 확인하십시오.
그렇지 않은 경우 아래 3 단계에http-ssl.conf
설명 된대로 파일 을 편집해야합니다 . ↓
3. " http-ssl.conf
" 파일 편집
이 파일에서 찾을 수 있어야
C:\xampp\apache\conf\extra
에 윈도우 또는이 참조 링크 에 대한 리눅스를 .
다음 줄을 찾습니다.
Listen 443
<VirtualHost _default_:443>
ServerName localhost:443
다른 포트 번호로 대체하십시오 ( 8013
이 예에서는).
Listen 8013
<VirtualHost _default_:8013>
ServerName localhost:8013
파일을 저장하십시오.
Apache 서버를 다시 시작하십시오.
액세스 : http : // localhost : 8012 가 작동하는지 확인하십시오.
4. XAMPP Apache 서버 설정 구성
If your want to access localhost without specify the port number in the URL
http://localhost instead of http://localhost:8012.
- Open Xampp Control Panel
- Go to Config ► Service and Port Settings ► Apache
- Replace the Main Port and SSL Port values with those chosen (e.g.
8012
and8013
). - Save Service settings
- Save Configuration of Control Panel
- Restart the Apache Server
It should work now.
4.1. Web browser configuration
If this configuration isn't hiding port number in URL it's because your web browser is not configured for. See : Tools ► Options ► General ► Connection Settings... will allow you to choose different ports or change proxy settings.
4.2. For the rare cases of ultimate bad luck
If step 4 and Web browser configuration are not working for you the only way to do this is to change back to 80, or to install a listener on port 80 (like a proxy) that redirects all your traffic to port 8012.
To answer your problem :
If you still have this message in Control Panel Console :
Apache Started [Port 80]
- Find location of
xampp-control.exe
file (probably inC:\xampp
) - Create a file
XAMPP.INI
in that directory (soXAMPP.ini
andxampp-control.exe
are in the same directory)
Put following lines in the XAMPP.INI
file:
[PORTS]
apache = 8012
Now , you will always get:
Apache started [Port 8012]
Please note that, this is for display purpose only. It has no relation with your httpd.conf
.
The best solution is to reconfigure the XAMPP Apache server to listen and use different port numbers. Here is how you do it:
1) First, you need to open the Apache “httpd.conf” file and configure it to use/listen on a new port no. To open httpd.conf file, click the “Config” button next to Apache “Start” and “Admin” buttons. In the popup menu that opens, click and open httpd.conf
2) Within the httpd.conf file search for “listen”. You’ll find two rows with something like:
#Listen 12.34.56.78:80
Listen 80
Change the port no to a port no. of your choice (e.g. port 1234) like below
#Listen 12.34.56.78:1234
Listen 1234
3) Next, in the same httpd.conf file look for “ServerName localhost:” Set it to the new port no.
ServerName localhost:1234
4) Save and close the httpd.conf file.
5) Now click the Apache config button again and open the “httpd-ssl.conf” file.
6) In the httpd-ssl.conf file, look for “Listen” again. You may find:
Listen 443
Change it to listen on a new port no of your choice. Say like:
Listen 1443
7) In the same httpd-ssl.conf file find another line that says <VirtualHost _default_:443>
. Change this to your new port no. (like 1443)
8) Also in the same httpd-ssl.conf you can find another line defining the port no. For that look for “ServerName”. you might find something like:
ServerName www.example.com:443 or ServerName localhost:433
Change this ServerName to your new port no.
8) Save and close the httpd-ssl.conf file.
9) Finally, there’s just one more place you should change the port no. For that, click and open the “Config” button of your XAMPP Control Panel. Then click the, “Service and Port Settings” button. Within it, click the “Apache” tab and enter and save the new port nos in the “main port” and “SSL port” boxes. Click save and close the config boxes.
That should do the trick. Now “Start” Apache and if everything goes well, your Apache server should start up.
You will also see the Apache Port/s no in the XAMPP control panel has change to the new port IDs you set.
Have you tried to access your page by typing "http://localhost:8012" (after restarting the apache)?
I had problem too. I switced Port but couldn't start on 8012.
Skype was involved becouse it had the same port - 80. And it couldn't let apache change it's port.
So just restart computer and Before turning on any other programs Open xampp first change port let's say from 80 to 8000 or 8012 on these lines in httpd.conf
Listen 80
ServerName localhost:80
Restart xampp, Start apache, check localhost.
If the XAMPP server
is running for the moment, stop XAMPP server.
Follow these steps to change the port number.
Open the file in following location.
[XAMPP Installation Folder]/apache/conf/httpd.conf
Open the httpd.conf
file and search for the String:
Listen 80
This is the port number used by XAMMP.
Then search for the string ServerName and update the Port Number which you entered earlier for Listen
Now save and re-start XAMPP server.
포트 ID 이상에서 작동하지 않으면 8082,8080과 같이 변경하십시오 .xammp를 다시 시작하고, 아파치 서버를 시작하고, 확인하십시오. 이제 작동 중입니다.
참고 URL : https://stackoverflow.com/questions/11294812/how-to-change-xampp-apache-server-port
'programing tip' 카테고리의 다른 글
웹 페이지에서 Apple의 새로운 San Francisco 글꼴을 사용하는 방법 (0) | 2020.08.26 |
---|---|
평신도 용어로 Java에서 '정적'이란 무엇을 의미합니까? (0) | 2020.08.26 |
Java에서 더 이상 사용되지 않는 가져 오기 경고 표시 안 함 (0) | 2020.08.26 |
해결 실패 : com.android.support:cardview-v7:26.0.0 android (0) | 2020.08.26 |
대소 문자 만 다른 변수 이름을 사용하는 것이 부도덕한가요? (0) | 2020.08.26 |