beginner to xampp - simple questions

Problems with the Windows version of XAMPP, questions, comments, and anything related.

beginner to xampp - simple questions

Postby its me » 13. October 2011 05:58

simple questions for xampp beginner

hello everybody, I have been testing xampp for a while and came up with some questions which i couldn't find in your forums, or mybe they are available but in different shapes, so please just try to answer my concerns if you have time, according to my limited information about this nice product :)

I'm Using windows 2008 server SP1 R2 and installed xampp 1.7.7 vc9 it is working fine

my questions are simple, but needs someone who used it long time like you :)

1 - how we can disable indexing feature around the server all over, i mean, if you need disable viewing the content of folder like this htt://site.com/folder/
--> i don't want to add index file in each folder!

2- why in phpmyadmin (after changing the auth mode to cookie) it works and asking for username and password, but why in the we based style? why not like asking for username and password in the htaccess style which seems like small popup window...?

3- why .htaccess doesn't work by default, is it because of the dot before the name? any article or subject here speaking about this point?

4- is php function for sending mail working with you? (without mail server installation) it didn't work with me, any known trick for this?

5- regarding the error pages, extension is "var" which software can open this to make it more elegance?

6- is there a way to monitor the usage of the site other than the weblizer? i mean with more detailed statistics like time on page and so on?


I know you might see these questions petty for you, but just to have better background for now guys :) and thanks in advanced

Mike




appreciated your help and thanks in advanced
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2

Re: beginner to xampp - simple questions

Postby Altrea » 13. October 2011 06:29

Hi its me,

its me wrote:1 - how we can disable indexing feature around the server all over, i mean, if you need disable viewing the content of folder like this htt://site.com/folder/
--> i don't want to add index file in each folder!

Define the autoindex behavior with the Directory Options value(s)

its me wrote:2- why in phpmyadmin (after changing the auth mode to cookie) it works and asking for username and password, but why in the we based style? why not like asking for username and password in the htaccess style which seems like small popup window...?

For that there is a different value "http" instead of "cookie". Cookie is script based, http is protocol based

its me wrote:3- why .htaccess doesn't work by default, is it because of the dot before the name? any article or subject here speaking about this point?

What do you mean by "doesn't work"? Windows GUI prevents creating files without a filename by default (in the command line creating or renaming to such files is possible, or by any code editor)
The dot in the front comes from the unix world where files with a dot in front are not visible in indexing.
If you mean they don't take effect in your Apache, that is configured with the AllowOverride Option in your Apache

its me wrote:5- regarding the error pages, extension is "var" which software can open this to make it more elegance?

Don't know what you want to say with that.

its me wrote:6- is there a way to monitor the usage of the site other than the weblizer? i mean with more detailed statistics like time on page and so on?

Google Analytics not recommend with XAMPP, because the server needs access to the google servers, so internet access is needed.
Piwik which i use for my projects too
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: beginner to xampp - simple questions

Postby Sharley » 13. October 2011 08:30

Hello Mike :)

its me wrote:1 - how we can disable indexing feature around the server all over
Open the \xampp\apache\httpd.conf file and change the line in red so the section looks like this
<Directory "C:/xampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options -Indexes +FollowSymLinks +Includes +ExecCGI
Save the file and restart apache then test - this is a server wide setting for folders within the htdocs tree.

For VirtualHosts the -indexes option is added to each vhost that requires it and overrides the httpd.conf settings.

This option -indexes can also be added on a folder by folder basis using .htaccess file which again overrides the htdocs setting - see the examples in the documentation - folder=Windows directory=Linux.



its me wrote:2- why in phpmyadmin (after changing the auth mode to cookie) it works and asking for username and password, but why in the we based style? why not like asking for username and password in the htaccess style which seems like small popup window...?
This setting can be changed in the \xampp\phpmyadmin\config.inc.php file so the section looks like this in red to change from cookie to http
$cfg['Servers'][$i]['auth_type'] = 'config'; /* Default */
$cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Web based style */
$cfg['Servers'][$i]['auth_type'] = 'http'; /* Small pop up window */
Only change the red line, don't add the other 2 lines as they are only for reference - save the file and restart Apache and MySQL.



its me wrote:3- why .htaccess doesn't work by default, is it because of the dot before the name? any article or subject here speaking about this point?
"doesn't work" is not very descriptive. Try and explain your issue with .htaccess - to open simply drag the file into a text editor for editing.
In the htdocs tree .htaccess is enabled by default.
(Right click on your text editor and select to run as administrator will allow opening and saving the file from the file menu).



its me wrote:4- is php function for sending mail working with you?
Yes, but you need to search the forums for sendmail as there are many examples that show you how to configure \xampp\php\php.ini and \xampp\sendmail\sendmail.ini to enable sending PHP form emails.



its me wrote:5- regarding the error pages, extension is "var" which software can open this to make it more elegance?
Again drag the .var file into a text editor for viewing and editing.

You can also right click on the .var file and select to always open this type of file with your text editor.



its me wrote:6- is there a way to monitor the usage of the site other than the weblizer? i mean with more detailed statistics like time on page and so on?
You can change how Webalizer behaves by opening and editing the \xampp\webalizer\webalizer.conf file which has comprehensive comment help text and in the readme file- make a backup copy of this file before editing so you have a known good starting point if edits go pear shaped.
More reading here:
http://webalizer.org/

Alternatives to Webalizer


Everyone has to start at the beginning and so your questions are not a problem for this forum, just need to remember that 'don't work' is a taboo for troubleshooting though. ;)

Best wishes Mike and good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: beginner to xampp - simple questions

Postby its me » 13. October 2011 10:35

thank you very much guys
highly appreciated really superb support and super guys :)
i will check and try what you have wrote and i will let you know indeed :)

Mike
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2

Re: beginner to xampp - simple questions

Postby Sharley » 13. October 2011 10:39

Mile wrote:i will check and try what you have wrote and i will let you know indeed
You're welcome Mike and I look forward to hearing your feedback. 8)

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: beginner to xampp - simple questions

Postby its me » 14. October 2011 11:03

thanks a lot again guys
i started testing with joy :)
now no-indexing issue worked and there is no indexes anymore, but it gives the same error of forbidden, so how i can edit this? i couldn't open it with front page, and if i open it with any other text editor it will show me thausands of texts which i don't really need to understand don't i?

then the htaccess how to manage the users and passwords and groups? any tutorial for that or an easy why to explain? currently doesn't effect, if i put .htaccess file in (there is many inside the htdocs folder) but like nothing is there! they don't react like they do on the hosting web servers which i am controlling from "password protected directories - in cpanel) or (htaccess editor in some other companies over the net)

yet please answer this yet more questions to come, i am trying :)

Mike
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2

Re: beginner to xampp - simple questions

Postby Sharley » 14. October 2011 12:21

its me wrote:but it gives the same error of forbidden
This normal behaviour when using -Indexes, it forbids you to see the file and folders in the that directory.

If you want, simply create a empty blank file in your text editor and save it as index.html and copy it to all the folders you don't want people to see a list of the directory - then all they will see is a blank white screen.

This is done on just about all web sites including forum, wiki and blogs etc. and is best practice.

It may seem like work but it is easy using Windows explorer once you have the blank index.html file created.
It is the best method.

Here are some results from a search on Google for no index when access a directory


its me wrote:then the htaccess how to manage the users and passwords and groups? any tutorial for that or an easy why to explain?
Not an easy question nor is a simple answer as you will need to do some reading to understand what cPanel does automagically via scripts.

Here are some online tools:
http://www.htaccesstools.com/
Not sure if these tools work for Windows based Apache servers like XAMPP as you need to encrypt the password using MD5, but see how you go.

Documentation and tutorials:
http://httpd.apache.org/docs/2.2/programs/htpasswd.html
http://httpd.apache.org/docs/2.2/howto/ ... .html#auth

To create a .htpasswd file in XAMPP go to the xampp-shell in the v3 control panel and type htpasswd.exe
(this file is in the C:\xampp\apache\bin folder if you want to use the Windows command console)

It will show you a help file with all the commands when you start htpasswd.exe again to craete your encrypted .htaccess file.

Here is an example:
Code: Select all
htpasswd.exe -c -m -b c:\xampp\security\xamppnew.users mike abcde123
which means:
-c = Create a new file
-m = Force MD5 encryption of password
-b = Use password from command line instead of prompting for it
New password file = c:\xampp\security\xamppnew.users - best place for this for security.
mike = username
abcde123 = password

See if you can follow the above when you have the .htpasswd help file open and try and have a go.

You will need to create your authentication .htaccess file using the documentation from Apache in the link above.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: beginner to xampp - simple questions

Postby its me » 14. October 2011 12:24

oh! that is a lot my friend, i need to read it and apply step by step to success :) i appreciate your offer really :oops:

regarding the indexing issue, as i said it gives forbidden when you try to access any folder via http that doesn't have index file
for example
http://name.com/folder/folder/
this gives forbidden error because doesn't have index files, it is ok, exactly what i need, but is it the same error of Apache 403? and how to control that message says forbidden object or index not found or server can't read this folder... something like this, really the var files in dir apache/error gives headache, a lot of functions and i don't know which one to edit... can you lead me? wnyway there is 2 forbidden errors there, one says forbidden.html.var and the other is xampp_forbidden_html.var but first, is i the same global forbidden 403 of apache!? so why error folder contains 2 forbidden errors? i mean: apache puts error 403 error code if default indexing view was disabled using the way you u teach me in the red code in your above reply? or there is special error pages for this?

i'm sorry, my way so years back was to be writing in details, then i found myself was writing a lot, for people who do not want details (@work) so i decided not to bother others with details when not needed :) i hope you got my point now

thanks a lot in advanced dear, and i will try that u told me about setting up the users and groups issue soon, as im trying to keep it a serious hobby and feeling really fun in this stuff :) :)

good day
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2

Re: beginner to xampp - simple questions

Postby Sharley » 14. October 2011 12:29

See my new content about the forbidden issue with indexes as it is normal to see a forbidden page.

In these forums when asking for support is will help greatly if as much detail about the issue is presented.

thanks for understanding. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: beginner to xampp - simple questions

Postby its me » 14. October 2011 12:34

thanks a lot, for sure, i am zooming into your post and your very helpful forums overall :) thanks a lot, i will keep you posted with my inventions :D
cya
Mike
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2

Re: beginner to xampp - simple questions

Postby Sharley » 14. October 2011 12:53

This the section from the XAMPP forbidden file and if you know html then you can edit it but as always make a backup copy of the file before editing - don't change this one if you get a result from the other one mentioned below.
Code: Select all
Content-language: en
Content-type: text/html; charset=ISO-8859-1
Body:----------en--
<!--#set var="TITLE" value="Access forbidden!"
--><!--#include virtual="include/top.html" -->

  <!--#if expr="$REDIRECT_URL = /\/$/" -->

    </p><hr />
    <p style="margin-left: 2.6em; font-size: 1.2em; color: red;">New XAMPP security concept:</p>
    <p>Access to the requested directory is only available from the local network.</p>
    <p>This setting can be configured in the file &quot;httpd-xampp.conf&quot;.</p>
    <hr /><p>

  <!--#else -->

    </p><hr />
    <p style="margin-left: 2.6em; font-size: 1.2em; color: red;">New XAMPP security concept:</p>
    <p>Access to the requested object is only available from the local network.</p>
    <p>This setting can be configured in the file &quot;httpd-xampp.conf&quot;.</p>
    <hr /><p>

  <!--#endif -->

<!--#include virtual="include/bottom.html" -->
----------en--
Add a Greek section perhaps??


This is from the other one - change this one first and test it
Code: Select all
Content-language: en
Content-type: text/html; charset=ISO-8859-1
Body:----------en--
<!--#set var="TITLE" value="Access forbidden!"
--><!--#include virtual="include/top.html" -->

  <!--#if expr="$REDIRECT_URL = /\/$/" -->

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

  <!--#else -->

    You don't have permission to access the requested object.
    It is either read-protected or not readable by the server.

  <!--#endif -->

<!--#include virtual="include/bottom.html" -->
----------en--
They both use SSI (Server Side Includes) to provide all that mumbo jumbo on the forbidden page but you could simply add your own wording to suit your needs, as you requested.


A simple replacement example
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Your web site name - Private Directory</title>
</head>
<body>
<center>
<b><font size="6" color="#FFFFFF">
<span style="background-color: #000000">Hello, this is a private directory.</span>
</font></b>
<br>
<br>
<a href="http://yoursite.com">Click here to go to My Site's Home Page</a>
</center>
</body>
</html>
Do you get the idea?


Best I can offer in this limited forum environment but I am sure you will enjoy having a go. :D
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: beginner to xampp - simple questions

Postby its me » 14. October 2011 12:59

I'm already enjoying indeed :)
Extremely appreciating your efforts dear, I'll what you told me and see the changes, will keep you posted, I'll make both files the same because so many files without knowing what they do or where r being used confused :D

Again, truly thanks for your time, i will be in touch
Mike
its me
 
Posts: 61
Joined: 03. October 2011 09:45
Operating System: Windows server 2008 SP1 R2


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 39 guests