473,890 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Xampp Drag n drop php sites in htdocs for quick preview

2 New Member
Hi every one,
I'm new to xampp & configuring etc
I've installed, uninstalled,
& again with what looks like a successful install.
http://localhost/phpmyadmin/ apperas to be working
also xampp-control.exe shows

All I want to do is preview
some pre made php websites, I'm not
over interested in learning php code.

the install folder is "C:\xampp"
I've tried to change the
default documentroot "/xampp/htdocs" to "C:\www"

I've dragged and dropped a prebuilt
website I downloaded into
"C:\www" then checked in http://localhost/ only to get

Access forbidden!

You don't have permission to access
the requested directory.
There is either no index document or
the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
localhost
07/26/08 19:38:24
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_c olor PHP/5.2.5


when configuring the httpd.conf - Is there any importance between
forward & backward slashes? / or \ ?
Are there any other files that need to be configured to
get this to work?(if it is possible at all)

Please - All opinions & thoughts welcomed
Jul 26 '08 #1
3 5982
lollielala
2 New Member
Is this a common practice? - I mean is it posible to
drag n drop a pre-built php website in to the
htdocs folder and have it 'work' ??
Jul 26 '08 #2
Atli
5,058 Recognized Expert Expert
Hi.

Try giving a complete location to a file that you know exists.
Like say: "http://localhost/index.php"

If that gives you a 403 error, the file permission is probably incorrect.
Which version of Windows are you running?

In any case, try giving "Everybody" total access to the files. If that doesn't solve the problem, it could be a problem with the Apache configuration.
Jul 26 '08 #3
bricklayer
1 New Member
I wouldn't bother trying to move the default xampp htdocs directory, it will probably cause more problems then it's worth. Instead you should create a virtual host. That way you can specify as many hosts as you want and where you want the files to be on the drive.

I have xampp installed in: C:\xampp

And my vhosts are in: C:\home\hostnam e\public_html

Because on my real server, the linux directory layout is:
/home/hostname/public_html

Where "hostname" is the first eight characters of the actual host name.

"www.somewebsit e.com" would have a path like (on bluehost, powweb, etc):
/home/somewebs/public_html/

So I would make a vhost on my drive like:
C:\home\someweb s\public_html\

Open w/ notepad: C:\xampp\apache \conf\httpd.con f

Change:

Expand|Select|Wrap|Line Numbers
  1. # Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf
To:

Expand|Select|Wrap|Line Numbers
  1. # Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf
  3. Include conf/vhosts/*.conf
Now make the folder: C:\xampp\apache \conf\vhosts

Create text file: C:\xampp\apache \conf\vhosts\00 .conf
And add this:

Expand|Select|Wrap|Line Numbers
  1. NameVirtualHost *:80
  2. NameVirtualHost *:443
That code will get included first and it will be applied to all the other vhosts.

Using the "www.somewebsit e.com" example (/home/somewebs/public_html/):
Create the text file: C:\xampp\apache \conf\vhosts\so mewebs.conf
And add this:

Expand|Select|Wrap|Line Numbers
  1. <VirtualHost *:80>
  2.  
  3.     ServerAdmin webmaster@somewebs.com
  4.     ServerName www.somewebs.com
  5.  
  6.     ServerAlias *.somewebs.com
  7.  
  8.     DocumentRoot C:/home/somewebs/public_html
  9.  
  10.     ErrorLog logs/somewebs.com-error_log
  11.     CustomLog logs/somewebs.com-access_log combined
  12.     ScriptAlias /cgi-bin/ "C:/home/somewebs/public_html/cgi-bin/"
  13.  
  14.     <Directory "C:/home/somewebs/public_html/cgi-bin">
  15.         AllowOverride None
  16.         Options +ExecCGI -Includes
  17.         Order allow,deny
  18.         Allow from all
  19.     </Directory>
  20.  
  21.     <IfModule mod_userdir.c>
  22.         UserDir public_html
  23.     </IfModule>
  24.  
  25.     <Directory "C:/home/somewebs/public_html/">
  26.         Options Indexes FollowSymLinks Includes
  27.         AllowOverride All
  28.         Order allow,deny
  29.         Allow from all
  30.     </Directory>
  31.  
  32.  
  33. </VirtualHost>
  34.  
  35. <VirtualHost *:443>
  36.  
  37.     DocumentRoot "C:/home/somewebs/public_html"
  38.     ServerName www.somewebs.com:443
  39.     ServerAdmin webmaster@somewebs.com
  40.  
  41.     ErrorLog logs/somewebs.com-error_log
  42.     CustomLog logs/somewebs.com-ssl_request_log   ssl_combined
  43.     TransferLog logs/somewebs.com-access_log
  44.  
  45.     ScriptAlias /cgi-bin/ "C:/home/somewebs/public_html/cgi-bin/"
  46.  
  47.     SSLEngine on
  48.     SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  49.     SSLCertificateFile conf/ssl.crt/server.crt
  50.     SSLCertificateKeyFile conf/ssl.key/server.key
  51.  
  52.   <FilesMatch "\.(cgi|shtml|phtml|php|php5|php4|php3?)$">
  53.       SSLOptions +StdEnvVars
  54.   </FilesMatch>
  55.   <Directory "C:/home/somewebs/public_html/cgi-bin">
  56.       SSLOptions +StdEnvVars
  57.   </Directory>
  58.  
  59.     #   SSL Protocol Adjustments:
  60.     SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
  61.  
  62. </VirtualHost>
Open w/ notepad: C:\WINDOWS\syst em32\drivers\et c\hosts
And below "127.0.0.1 localhost" add:

Expand|Select|Wrap|Line Numbers
  1. 127.0.0.1 www.somewebs.com
  2. 127.0.0.1 somewebs.com
Open: C:\home\someweb s\public_html\
And create an index.html file - and in it put: "Hello World!".

In your browser, go to: www.somewebs.co m
And it should say "Hello World!" on a white screen.

So now you have the real site at: www.somewebsite .com
And the virtual site at: www.somewebs.co m

------------------------------------------------

To make another vhost, copy "C:\xampp\apach e\conf\vhosts\s omewebs.conf" to like: C:\xampp\apache \conf\vhosts\te mpuser.conf

Open "tempuser.c onf" and rename (in this order):
www.somewebs.co m to www.tempuser.co m
somewebs.com to tempuser.com
somewebs to tempuser

Then add this to the "C:\WINDOWS\sys tem32\drivers\e tc\hosts" file:
Expand|Select|Wrap|Line Numbers
  1. 127.0.0.1 www.tempuser.com
  2. 127.0.0.1 tempuser.com
And create (Hello World!): C:/home/tempuser/public_html/index.html

Repeat as necessary.

------------------------------------------------

Now you can drag n drop html sites into the virtual host directory and view them. PHP based site will work too but if they require a database, it will have to be created and populated with phpMyAdmin before you can view the site.
Aug 12 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2667
by: scissorhand | last post by:
Is drag and drop feature available in ASP .Net? I am developing a webpage which requires a system administration function. Users in the admin group have to drag user icon to a group icon and assign them with the permission in the group. Is it possible to display both users and groups in treeview style in ASP .Net? If not, please suggest alternatives for me to accomplish the task. Thanx
0
1255
by: nicomp | last post by:
I studied the Drag and Drop example that all the .Net dev sites link to: a string is dragged from one list box to another. It all makes sense but it doesn't explain how to determine what the object being dragged is. The code assumes the object is a string and only verifies that is really is a string. How can I drop into a Select Case and handle all the possible cases that the object might be? I can call e.Data.GetFormats( ) and then...
2
9219
by: Grey | last post by:
I need to design a workflow application with C#. I want to design an UI with some workflow components which they can be drag & drop anywhere in order to design the workflow for the application users. Moreover, when the user double click on the component, they can define some routing rules for the process. Is it possible to have such fancy UI in C#?? Any reference sites or tutorial?? Million Thanks.
0
2258
by: John K | last post by:
I am still pretty new to this environment and don't know much about httpd.conf. I understand that it is the place to configure the server but don't know how to actually use it for what I'm trying to do. I use XAMPP to develop locally. There is an external test server here but it can be a pain to mess with it as I can only use it via SSH (something else I'm new to) and prefer to develop locally until I have enough to bother with moving...
2
1525
by: dejavue82 | last post by:
Dear ASP.NET programmers, I have noticed many asp.net 2.0 programmers mention that web applications created with the use of Visual Studio wizards and by draging and droping fom the toolbox are unstable/unmaintainable (or not enterprise ready). I'm sure I understand this. Isn't the code created by these wizards exactly the same code that one would have to implement manually? Shouldn't both ways yield the same (or at least similar...
18
3167
by: Frances | last post by:
I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for 2 years now, and even though I know there are ways you can use PHP in conjunction with Tomcat, I'd rather not tinker with Tomcat.. I think I'd rather try to do it straight 'from scratch'... following instructions here, http://us2.php.net/tut.php.. so you need both Apache **AND** PHP server? not sure what to dl when get to http://www.apache.org/ (HTTP Server? top...
3
14809
by: lee9372 | last post by:
Is there a way to change default home page under Xampp, so that when I type http://localhost it would go to a home page other than page with popup asking for Xampp authorization.
0
8513
by: Mathias K. | last post by:
Hello everyone! I just installed Python 2.5 and i want to use Python to build websites. I could load mod_python successfully with Apache but i fail to let the .py-files to be executed! In /htdocs/python i got my test file: from mod_python import apache
0
1537
by: Bala | last post by:
Hi Experts, I'm using Xampp control for php and i set the smtp configuration in php.ini as SMTP=mail.domainserver.com smtp_port=25 but still i got an error like this.
0
9979
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7171
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4276
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.