Hosting php application on Windows Server 2008 R2 - php

I have installed xampp on my local machine as well as Windows Server 2008 and Apache and MySql is running on both.
I created a test application which I am running on my local machine.
http://localhost/example/
I want to test this example application on the server. How can I do this?
adding 192.168.1.11/example/(ip address of the server) gives me 404 - File or directory not found.

You would have to move those files over to the server instance. and make a change in your XAMPP configuration to allow the IP of your local machine to connect to the instance.
Do you have physical access to the server instance? (I.E. VM/SSH, In basement)
This question might be helpful if you are looking to allow an external IP.
httpd-xampp.conf: How to allow access to an external IP besides localhost?

Related

how to connect and secure the connection between my website and and the accounting system on my local server?

my website is php laravel hosted in a cloud server and the accounting system is on my local server and coded by apache using php codeigniter, keep in mind i have mikrotik router on my local network and have bought a static ip from my ISP, would like to provide the maximum level of security possible
so far i installed windows server 2016 on my local server and installed active domain directory and dns and file server and installed winbox to configure the mikrotik router for what is needed

Use local apache API from Laravel

I have developed an API which is available locally on loc.api and on production on live.api (obviously the domains are just an example).
The API runs locally on a classic apache server.
Now I am playing with Laravel, using this API. No problem connecting to live.api (as I am using the real domain), but fails to connect to my local API.
I am guessing it is just a host config issue, as Homestead fails to connect to my normal apache server on my cumputer.
If that is the case, I should just have to define an IP linked to loc.api, but I have no idea what IP I should use there.
So to recapitulate, no problem running loc.api on my local apache server, no problem running live.api, no problem running Laravel on its own or connected to live.api, but can't seem to get Laravel to work with my loc.api
Any ideas ?
Homestead runs on something akin to a virtual machine. The virtual machine's localhost is indeed the local IP address used internally within the virtual machine. In order to communicate with the host machine (the machine running the virtual machine) you need to use the default gateway IP address. This is the IP address which the virtual machine uses to refer to its host system.
The default varies depending on the configuration of the virtual machine. Ideally, if you've setup your API normally on your localhost and access it locally via 127.0.0.1 (or localhost) then setting your local site configuration to the default gateway will work.
However, if you set up your API through a virtual host and you access it via local.api or some host like this you need to modify your virtual machine's /etc/hosts file (since homestead is serving an Ubuntu OS) and enter a line like
<gateway IP> local.api
This way you can use local.api as your API host address which will resolve to the gateway IP and call the API using the correct hostname.

EC2 (t1.micro) Windows XAMPP Can't Connect via web

I have opened a micro instance on AWS with a Windows_Server-2008-R2_SP1-English-64Bit-Base-2013.11.13 (ami-1e53c82e) virtual machine. RDS is open and I have connected with remote desktop connection. Additionally, at initialization I set HTTP (port 80), and HTTPS (port 443) although I do not know how to verify that now. From within the VM I navigated to XAMPP and installed a default installation (minus MySQL). I then navigated to XAMPP control panel V3.2.1 and started Apache. I set a password on XAMPP directory. I set a "Hello World" test txt file in htdoc and that loads in the VM browser. However, when I try to access the pubic IP, my local browser times out.
I think I covered the first three checks on
"xampp configuration in windows server 2008 r2 ec2 instance" post
but not sure how to change the elastic or private IP response if that is relevant.
If you're using VPC, you have to allow both inbound/outbound in the network ACL and inbound for the security group. You probably also have to open the ports in the windows firewall.
Edit: You definitely don't want to disable the firewall altogether. Also, it doesn't matter whether you use public ips from within AWS. And public host names resolve locally anyway.

why apache web server running on windows 7 not able to allow external incoming connections

I have apache web server 2.4 set up on an Windows 7 - 64 bit in school with php 5.3 and mysql installed. This web server has a static ip address and I have allowed the Apache httpd.exe program on Windows 7 firewall.
When I tried to access the page in school (on the same LAN), I was able to access the page. But, when I tried to access it from home (with an external ip address) I wasn't able to access the web page hosted on the web server. When I tried to ping the static ip address of the web server in school it works but when I ping from outside school network, I get lost packets.
Further, I have Adobe Flash Media Server 4.5 installed on the same machine listening on ports 1935 and 1234.
I have also tried to uninstall and re-install apache but to no avail.
Any idea on how what is the problem here? Or any ways to test out the problem?
Is the problem because of Windows 7 tight firewall security? or 64-bit machine? or the adobe flash media server running on the same machine? or any misconfigurations out there in Apache?
Note: the static ip address is accessible and the server can serve a page when the server is running on windows xp previously. Recently, I just changed to windows 7 but the apache server can't seem to serve the same page.
Would really appreciate some help here!!! Thanks
Your server machine may have a firewall which allows connections, but the machine may stand behind the router which does not forward ports correctly. Have you checked this?
The LAN is being protected by the router to the external network. You need to get the administrator to configure this router.

Is it possible to configure Apache to host both an ASP.NET Web Service and a PHP Web site?

Noob question (because I'm a noob when it comes to Web development). I'm not sure whether I should ask it here or at ServerFault.
I am developing an ASP.NET Web Service and a PHP Web site consuming the Web Service. They are meant to be run on different machines. However, only for development purposes, I need to run both on my machine. I cannot use virtual machines.
I would like to know if it is possible to configure IIS Apache to host both my Web Service and my Web site? Or, do I need to host the PHP site using Apache?
I am using
IIS 7.5 Apache HTTP Server 2.2 (NOTE: I have nothing against Apache. In fact, so far I like it more than IIS, however, I would rather not have two Web server applications installed in the same machine.)
PHP 5.3.4
.NET Framework 2.0 3.0 or 3.5 (whichever comes with Visual Studio 2008)
mod_aspdotnet for Apache 2.2
You can't. The best way is to setup apache and IIS on the same machine. Since it is dev you can just bind Apache to port 8080 or something. If you need them on separate IPs you need to make sure to change IIS to not bind to all addresses if you want to run both on port 80.
My setup is similar except in dev I bind apache to port 8080 and then on production we run servers with both IIS and Apache where unique IPs have to be binded to by each server.
For running them on binded ports, same ip (dev)
http://blogs.sitepoint.com/2010/07/13/run-apache-iis-same-time-1/
For running them on same machine binded to different IPs on port 80:
http://www.monochrome.co.uk/blog/2006/06/20/running-apache-and-iis-6-together-on-the-same-server
Apache can not host ASP.net websites. You will need to install IIS, which also works for PHP. You can get an all-in-one installer from Microsoft here: http://go.microsoft.com/?linkid=9722553
Apache does not officially support ASP, however, there are ports like Apache::ASP.
Please see the Apache Server FAQ
It is possible. Look at mod_aspdotnet project.
.NET and PHP files will be triggered by extensions and/or directories. Just set them up correctly in your httpd.conf
However, you will be working with older asp version. If you are on a Windows machine, the best course of action is to set up IIS and PHP.

Categories