مقالات تقنية

Troubleshooting Apache in Wamp and Xampp Server

Opening Up Port 80 For Apache to Use On Windows

For Apache to be able to start/run, it has to be able to bind to (and listen on) port 80 (the HTTP port).

If after installing Apache, rebooting, and trying to start Apache again – Apache is not able to bind to port 80 and start, then another Application or Service has already taken this port.

For Apache to start, we have to figure out what’s using port 80 (and possibly port 443) on your system, and stop and disable it.

Known Windows Services That Listen on Port 80

From Services Manager (run: services.msc), stop and disable these native Windows Services which are known to bind to port 80.

Double click Service, and change ‘Startup Type’ to ‘Disabled’.

  1. SQL Server Reporting Services (ReportServer)
  2. Web Deployment Agent Service (MsDepSvc)
  3. BranchCache (PeerDistSvc)
  4. Sync Share Service (SyncShareSvc)
  5. World Wide Web Publishing Service (W3SVC)
  6. Internet Information Server (WAS, IISADMIN)

You might, or might not, have some of these Services installed and running.

HTTP (HTTP.SYS) Hidden Driver/Service

Windows Server 2003/2008/2012 and Windows XP(SP2)/Vista/7/8 come with an HTTP front-end proxy service who’s job is to parse and forward incoming HTTP requests to other Services.

Values in URL “http://hostname:port/virtual_url_or_dir” are registered with it, and when an HTTP request comes in that matches on those values, that request gets routed to the other application or service (which itself is running on a different port).

HTTP.SYS is usually started “on demand” by other services (Windows Remote Management, Print Spooler, etc), and is not usually listening on port 80 until some other application registers a HOST (127.0.0.1) + PORT (80) + virtual URL/DIR with it. HTTP.SYS runs under PID 4 (NT Kernel).

On some Windows systems, oftentimes port 80 is already taken by HTTP.SYS for use.

Show Reserved URLs:

 

netsh http show urlacl

 

Show active Registered URLs:

 

netsh http show servicestate

 

To Disable HTTP.SYS:

Control Panel > Device Manager
In menu View, select: Show hidden devices
Open tree: Non-plug and Play Drivers
Double-click: HTTP
Tab Driver - Group Startup
Switch from: Demand to Disabled

Or run this from the administrative privledged command-line (right click cmd.exe, select – run as admin):

net stop http /y
sc config http start= disabled

Other Web-Server Applications

Make sure you’re not running:

A. Other instances of Apache

B. IIS and/or WebMatrix

C. Tomcat

IIS and Tomcat are web-server applications that also bind to port 80 by default.

IIS can be removed via Windows Features on Vista/7/8, or on Windows Server via Role and Components Removal.

Skype

Skype usually takes up ports 80 and 443.

You’d need to stop Skype and change its settings to not use these ports:

Tools > Options > Advanced > Connection
Uncheck "Use Port 80 and 443 for incoming connections"

Or set Apache’s Startup type as “Automatic”, this way Apache might start before Skype does, and will be able to bind to port 80 and 443 before any other application has a chance to take these ports.

* Skype for Windows 8 (Modern UI) is not able to change port numbers. Only “Skype for Desktop” can do this.

TeamViewer

Check both Tasks Manager (Processes Tab – click ‘Show processes from all users’) and Services Manager to see if you have “TeamViewer” running… This process or service waits several minutes after computer start-up, and then takes port 80 if it’s available. If present, you should stop and disable it too, or configure it not to use port 80…

Disable TeamViewer from using port 80:

Extras > Options > Advanced
Enable option "Don't use incoming port 80"

Windows Work Folders

Under Windows Server 2012 R2 and Windows 8, Microsoft has introduced a new feature called “Work Folders”, that synchronizes files/folders between different machines.

By default, “Work Folders” uses ports 80 and 443!

There are 3 options to get around this, from simplest to more difficult…

A) Disable the Windows ‘Sync Share Service’, named “SyncShareSvc”.

B) Remove/ “Work Folders” Server Role / Windows Feature:

Launch Server Manager. Click "Add roles and features".
Server Roles -> File and Storage Services -> File and iSCSI Services -> Work Folders

C) Or change the ports “Work Folders” use:

Edit file:

C:\Windows\System32\SyncShareSvc.config

Change ports from 80 to 11180 and 443 to 11443 (or something else)…

<sites>
...
    <bindings>
        <binding protocol="http" bindingInformation="*:80:" />
        <binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
...

Then from a permissions-elevated command-line (right click cmd.exe, Run as admin), run:

Netsh http add urlacl url=http://*:11180/ user="NT Authority\LOCAL SERVICE"
Netsh http add urlacl url=https://*:11443/ user="NT Authority\LOCAL SERVICE"

You’ll also need to follow more instructions here:

http://blogs.technet.com/b/filecab/archive/2013/10/15/windows-server-2012-r2-resolving-port-conflict-with-iis-websites-and-work-folders.aspx

Work Folders on Windows Server 2012 R2 Essentials

VMware Host Agent service

The VMware Host Agent service uses TCP ports 80 and 443 by default.

Edit > Preferences > Shared VMs
Change the ports

VMware, Configure Virtual Machine Sharing and Remote Access

Use NETSTAT to Detect Port 80 Listeners

Open the command line (System tab, button: Command Line) and run:

 

netstat -o -n -a | findstr 0.0.0.0:80

netstat -o -n -a | findstr 127.0.0.1:80

 

Inspect the lines with a “Local Address” showing port 80 and/or 443 use. Note the PID number. Then open Task Manager (run: taskmgr.exe), go to it’s Processes Tab, see if you can find the application with that same PID number. It needs to be shut down. If you don’t see it, click “Show processes from all users” button.

http://support.microsoft.com/kb/281336

On some systems you can also get the PID directly by using netstat’s ‘-b’ option:

-b    Displays the executable involved in creating each connection or
      listening port. In some cases well-known executables host
      multiple independent components, and in these cases the
      sequence of components involved in creating the connection
      or listening port is displayed. In this case the executable
      name is in [] at the bottom, on top is the component it called,
      and so forth until TCP/IP was reached. Note that this option
      can be time-consuming and will fail unless you have sufficient
      permissions.


تفضيل

احمد ناصر

أخوكم احمد حماد المعروف ب (أحمد ناصر) حاصل على شهادة البكالوريوس في علم الحاسوب (البرمجة وهندسة البرمجيات) من جامعة بيرزيت ومبرمج ومطور انظمة مرخص من شركة سيلز فورس كلاود العالمية، يعمل في مجال برمجة وتسويق التطبيقات والالعاب منذ اكثر من 5 سنوات وقام بنشر وتصميم وبرمجة العديد من الالعاب لمنصات الاندرويد والايفون والفيس بوك واليونتي ولديه اكثر من 20 لعبة مرفوعة على المتاجر المذكورة. يعمل حاليا كمستشار تقني في عدة شركات كشركة انترجوي، وريتش وشركتنا الخاصة أحمد ناصر للحلول الشاملة ويقوم بتقديم خدماته التدريبية في عدد من المعاهد في الشرق الاوسط ويختص في تطوير الكادر التقني العربي في مجالات الويب والموبايل والالعاب والتسويق الالكتروني، سجل معه في دوراته باللغة الانجليزية والعربية اكثر من 10000 طالب وحصل على تقييم من 4.8 الى 5 نجوم في مختلف الدورات في تصميم وبرمجة الالعاب التي يمكنك مشاهدتها على موقعنا، يسرنا ان ننقل خبرة السنوات اليكم في ساعات قليلة وفي غضون بضعة اسابيع ستملك جميع الخبرة اللازمة لتكون مطور العاب و تطبيقات محترف ومستقل وأكثر. قبل 12 سنة تقريبا بدأت باستخدام برنامج الفوتوشوب وأحسست ان لي ميولا كبيرا نحو عالم التصميم فتعلمت الفلاش وبرامج الملتميديا وكان لي برامج تعليمية ومسابقات قمت بتصميمها لمختلف النوادي والجمعيات وبعض المؤسسات حيث انني عملت في مجال التصميم والطباعة لفترة جيدة في حياتي كمصمم، بعدها انتقلت الى تعلم البرمجة بداية من لغة السي والفيجوال بيسك مرورا بتعلم اكثر من 18 لغة برمجة مختلفة شكلت لي كمهووس بالبرمجة قدرة كبيرة على الربط بين جميع هذه اللغات لعمل بعض البرامج المختلفة البنية. عملت لعدة سنوات مصمم ومبرمج لبرامج وتطبيقات الويب لعدد من وكالات الاخبار والمواقع التجارية الالكترونية في الشرق الاوسط وأمريكا، بعدها قررت الانتقال الى برمجة تطبيقات الاندرويد والايفون وعملت عدة تطبيقات كبيرة لزبائن في الامارات والمملكة المتحدة وأمريكا. قررت بعدها الانتقال الى مجال برمجة الالعاب وخصوصا اليونتي لانه كان لي ميول كبير في ربط كل الخبرات السابقة الى مجال اكثر من رائع وهو مجال الالعاب الالكترونية لاجهزة الموبايل والذي حقق مبيعات اكثر من 13 مليار دولار في 2014 وحدها، قمت خلال اكثر من ثلاث سنوات من العمل على منصة اليونتي بتطوير اكثر من 20 لعبة لمختلف الزبائن حول العالم وقمت بتصميم العاب والعمل على تسويقها بنفس الوقت الامر الذي اكسبني خبرة كبيرة في مجال بيع الالعاب وتسويقها بالاضافة الى برمجتها وتصميمها. وجدت ان هناك صعوبة لدى فئة كبيرة في تعلم البرمجة لذلك قررت البدء بتعليم وتدريس البرمجة عن طريق الالعاب لعدد كبير من الطلاب ليستفيدوا ويحققوا نجاحهم واستقلاليتهم ولنقل تجربتي الشخصية لهم فقررت البدء بتدريس البرمجة واضعا هدفا واضحا نصب عيني وهو: تعلم البرمجة والتصميم لا ينبغي ان يكون صعبا، مقلقا او معقدا لسوء الحظ، العديد من الكورسات التعليمية تمشي مع الطالب بسرعة كبيرة، يفترضون ان الطالب يكون لديه الخبرة التقنية المتقدمة او لا يقدمون اية مهارات عملية.
زر الذهاب إلى الأعلى
رجوع
00970599042502
WhatsApp
Telegram
Messenger
البريد الإلكتروني
Live Chat
الاستشارات المباشرة
جميع الدورات
خدمات شركتنا
الدعم الفني
تحتاج مساعدة تواصل معي واتساب