To achieve that I had to turn off a blocking rule and adding one to open port 80. This can be different basing on your machine and firewall settings.Īnyway, port 80 must be reachable from client but not open for anybody from anywhere. To reach the files you need to change, click on the Apache Config button in the XAMPP Control Panel as the image shows.įIRST CHANGE: Now click on the nf and look for the part where it saysĮnter fullscreen mode Exit fullscreen mode Step 3 – Firewall Settings I suggest to make a backup copy of the files we are going to change. You need to change some XAMPP server configuration in the server machine. There are many ways to do so and internet is full of good tutorials.Īnd here’s an article: STEP 2 – Change some XAMPP settingsĪfter setting static IP addresses let’s make an example assuming we have a machine sharing its XAMPP (which I’ll name “server” from now on) with IP 192.168.1.10 and another machine that will connect to the server (which I’ll name “client” from now on) with IP 192.168.1.11 That’s not mandatory, but it’s the easiest and safest way to go. STEP 1 – Getting static IPs for your machines Hope this can help even with different environment too. I found many similar tutorials online, but none was merging all I needed, so I decided to share my solution. That last feature was the most important for me to achieve because I needed to work with a teammate on the same project, each one on a local copy but both connected to the same DB, managing changes with a git repository on Github. This creates two new files in the bin folder- server.csr and server.key (with your server's name replacing server).In this simple step-by-step tutorial I’m gonna explain how to share a local server (using XAMPP) with your local network in order to share DB, folders in httpdocs (local websites) and even start a XAMPP server on other machines running a local website that connects to a DB in the shared server. Follow the prompts to enter information for your certificate, including your 2-letter country code, other region info, and your email address.When prompted to enter a challenge phrase, leave it blank.When prompted for the "Common name" or FQDN, enter your full hostname (e.g., ).Type or paste this command and press Enter, replacing "server.key" and "server.csr" with the name of your server (e.g., wikihow.key and wikihow.csr: openssl req -new -newkey rsa:2048 –sha256 -nodes -keyout server.key -out server.csr.Open Command Prompt, type cd C:\Apache24\bin, and press Enter.The first thing you'll need to do is use the built-in OpenSSL tool to create a certificate request, which you can then submit to a certificate authority like DigiCert or Comodo. If you want visitors to your website to be able to connect securely with SSL (https), you'll need to install an SSL certificate. Because of this, you should only host a website on your computer if you have a static IP address. If you don't have a static IP address, you'll need to update nf every time your IP address changes.Keep in mind that you'll need to use your public IP address if you want people outside of your network to be able to access your self-hosted website. If you don't have a registered hostname, enter your computer's IP address instead.If you're going to run Apache on a different port, replace "80" with your preferred port number.If you've registered a domain name that's pointing to your computer's IP address, you'll want to enter that next to ServerName before the ":80." For example: ServerName.You can find it quickly by pressing Ctrl + F and searching for "ServerName." Enter your IP address or hostname next to "ServerName." While Apache may be able to determine this information automatically, it's best to specify which hostname or IP address people will be using to access your website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |