AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Store (https://forums.alliedmods.net/forumdisplay.php?f=157)
-   -   Issue .htacess for web panel 2.0 (https://forums.alliedmods.net/showthread.php?t=286901)

hkkelvin1995 08-27-2016 09:42

.htacess for web panel 2.0
 
hello
I have a xampp server running on my windows machine
recently trying to upgrade the store webpanel to 2.0
however, in the installation instruction
HTML Code:

Point the http root dir to the /public folder or Setup a .htaccess file that redirects all request to public and prevents access all other folders and the .env file. Read this and google, there are a lot of tutorials .(If you dont do that, everyone can get your db credentials)
After hours of googling, i still cant figure out how to do this
my apache server's root dir is c:\xampp\htdocs
and my store webpanel is c:\xampp\htdocs\store
could anyone help me to setup the .htacess file?
many thanks

Arrow768 08-29-2016 16:33

Re: .htacess for web panel 2.0
 
In your xampp\apache\conf\extra you have a httpd-vhosts.conf file

Add a new virtual host that points to where you have your webpanel installed


The ServerName directive sais that the webserver will show this page when it gets a request for the specified server name.

Ofc you have to make sure that the request gets to the webserver.
If you dont use a FQDN (as I do for my dev install) you could do this with a entry in the hosts file.

Dont forget to restart your apache after changing the file
PHP Code:

<VirtualHost *>
    
DocumentRoot "F:\XAMPP\htdocs\WebPanel-Core\public"
    
ServerName webpanel-core.local
    
<Directory "F:\XAMPP\htdocs\WebPanel-Core\public">
        
Order allow,deny
        Allow from all
    
</Directory>
</
VirtualHost



All times are GMT -4. The time now is 03:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.