The Apache Haus Forum

Advanced search  

News:

Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Where to put my website...?  (Read 42 times)

TinyTom

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Where to put my website...?
« on: October 29, 2020, 12:16:51 PM »

Hi, I am partially new to Apache but very new to Apache Haus.

I have worked briefly with Apache on Linux and it just seemed to work minimum hassle: Put your files into a folder and the server read them.

I'm trying to put together a light PHP server to test some code on Windows 10 and I'm having trouble finding where to put the files.

I have got Apache working and it loads localhost with the default /htdocs/index.html. I cracked open the /conf/httpd.conf as I've read that's where the server settings are set. I used [this tutorial][https://www.znetlive.com/blog/how-to-install-apache-php-and-mysql-on-windows-10-machine/] to setup the php. (instead of adding the PHP code, I uncommented the Include conf/extra/httpd-fcgid.conf and pointed the server to the php code in httpd-fcgid.conf)

My understanding is that in httpd.conf,DocumentRoot is where the server looks for folders and DirectoryIndex is where it sets the index.

So I thought I could add files to where DocumentRoot was looking , like having "~/htdocs/home.html" to load "localhost/home.html" or change DirectoryIndex in httpd.conf to look at a file called home.html instead of looking at index.html.

What I was expecting was to add something similar to DocumentRoot D:/www to httpd.conf and then just dropping my html files in there for the server to read.

I changed the "htdocs/index.html" to include the line "Hello World" and now the page won't load. I've re-extracted the httpd.conf from the downloaded file and replaced mine, and it's still not loading.

Is there a trick I'm missing here?

Trying to start Apache24 in services.msc gives me "Error 1067: The process terminated unexpectedly".

I have noticed that in services.msc windows has saved the "Path to executable:" as "D:\Apache24\bin\httpd.exe" -k runservice instead of using the command -k start. Don't know if that might be causing any issue.

---------------------------------------------------------------------------------------------------------
Edit:
Did a clean install, removed all files and all services and then reinstalled everything using apache commands. Removed environmental variables another tutorial suggested I include and it all seems to be working fine.

Loaded my files into /htdocs/ and they seem to load on the server now.

Only thing I haven't done yet is installed my php which I'm guessing is where the problem is...

---------------------------------------------------------------------------------------------------------
Edit:
From the sounds of Gregg's lament here it sounds like it's a headache along with MySQL...
https://forum.apachehaus.com/index.php?topic=117.0

----------------------------------------------------------------------------------------------------------
Edit:
And using this tut I managed to get my php to work.
https://danielarancibia.wordpress.com/2015/09/27/installing-apache-2-4-and-php-7-for-development-on-windows/

Now to try and get this damned contact form working...
« Last Edit: October 29, 2020, 01:56:10 PM by TinyTom »
Logged

Gregg

  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 875
Re: Where to put my website...?
« Reply #1 on: October 29, 2020, 06:22:18 PM »

From the sounds of Gregg's lament here it sounds like it's a headache along with MySQL...
That did turn out to be machine specific which is something I had thought. I just didn't have a second machine to test with. The server I'm using these days does not have either of those problems so I'm happy. I had to live without php for so long I just got used to it.

Glad you got it working again and good luck with the contact form.

Logged
Pages: [1]   Go Up
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13