Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":3014,"date":"2020-01-09T21:24:15","date_gmt":"2020-01-09T21:24:15","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=3014"},"modified":"2020-01-09T21:24:15","modified_gmt":"2020-01-09T21:24:15","slug":"how-to-setup-apache-on-windows-server","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/how-to-setup-apache-on-windows-server\/","title":{"rendered":"How To Setup Apache on Windows Server"},"content":{"rendered":"

This tutorial will show you how to run the Apache HTTP server on Windows Server.<\/p>\n

Running an HTTP server will allow you to host a web site and put up files for download. Apache is open-source software and one of the top HTTP servers available.<\/p>\n

Bundled packages<\/h3>\n

If you just want to get a Web server running quickly, you can install one of the ready-made packages such as\u00a0XAMPP<\/strong><\/span><\/a>\u00a0which include Apache, PHP, MySQL, and an easy to control interface. Even when using such a package, there are no constraints when it comes to modifying the server configuration. However, for an advanced setup, you may want to manually install your web server.<\/p>\n

Installing Apache<\/h3>\n

Download the Windows MSI installer from the\u00a0Apache download page<\/strong><\/span><\/a>\u00a0and fill in the details. Choose “All Users” and “Service” mode. You will most likely want to leave the port at 80, but you can change it. You simply need to make sure that this port is opened in the Windows Firewall.<\/p>\n

After running the installer, the Apache Monitor will have been installed. You can control the status of Apache services from this application – using start, stop, and restart. You can also do so from Windows’\u00a0services.msc<\/code>. By now, you should be able to contact your server on\u00a0http:\/\/127.0.0.1<\/code>\u00a0and see the default Apache page.<\/p>\n

You can add, edit, and remove web files from your web server by changing the\u00a0htdocs<\/code>\u00a0folder within the\u00a0Apache<\/code>\u00a0folder. This is the default location for web files. Alternatively, you could make use of virtual hosts in order to use other directories, or set up sub-domains.<\/p>\n

Apache has two important configuration files:\u00a0.htaccess<\/code>, which applies on a directory-by-directory basis within the web files, and\u00a0httpd.conf<\/code>\u00a0inside Apache’s\u00a0conf<\/code>\u00a0folder, which addresses the main configuration.<\/p>\n

Installing PHP<\/h3>\n

PHP allows you to make use of PHP scripts on your web server and display the results to users.<\/p>\n

Download the Windows version of PHP from\u00a0PHP Windows downloads<\/strong><\/span><\/a>. Download the proper version and then extract the zip file to\u00a0c:\\php<\/code>.<\/p>\n

Next, edit Apache’s\u00a0httpd.conf<\/code>\u00a0to include the following:<\/p>\n

LoadModule php5_module \"c:\/php\/php5apache2_2.dll\"\r\nAddType application\/x-httpd-php .php\r\nPHPIniDir \"C:\/php\"\r\n<\/code><\/pre>\n

You should then restart the Apache server. In order to test PHP, create a\u00a0test.php<\/code>\u00a0file in your\u00a0htdocs<\/code>\u00a0folder with the following content:<\/p>\n

<?php phpinfo() ?>\r\n<\/code><\/pre>\n

… then check the output at\u00a0http:\/\/127.0.0.1\/test.php<\/code>.<\/p>\n


\n

Your Windows\/Apache setup is complete.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[109,248],"manual_kb_tag":[499],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3014"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=3014"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3014\/revisions"}],"predecessor-version":[{"id":3015,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3014\/revisions\/3015"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=3014"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=3014"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=3014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}