This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

FILE BROWSE

Discussion relating to version 1.3.x and 1.4.x

FILE BROWSE

by jupong47 » Tue Dec 10, 2013 5:30 am

Guys im new here thank goodness ive found a forum for symfony 1.4

guys ive browse a file in symfony : (domain_name/app_name/config/databases.yml) - and i can browse it..
how to stop this guys in order not to browse those file.. especially databases.yml..

PLEASE HELP... ;(
jupong47
Junior Member
 
Posts: 5
Joined: Tue Dec 10, 2013 5:18 am

Re: FILE BROWSE

by jupong47 » Wed Dec 11, 2013 4:29 am

Ive found a solution guys .. but then my other local sites in htdocs is no longer accessible.. how to do this? please help. :(
<VirtualHost *:80>
# DocumentRoot "c:\xampp\htdocs\climbs\web"
# DirectoryIndex index.php
# <Directory "c:\xampp\htdocs\climbs\web">
# AllowOverride All
# Allow from All
# </Directory>
# Alias /sf "c:\xampp\htdocs\climbs\lib\vendor\symfony\data\web\sf"
# <Directory "c:\xampp\htdocs\climbs\lib\vendor\symfony\data\web\sf">
# AllowOverride All
# Allow from All
# </Directory>
#</VirtualHost>
jupong47
Junior Member
 
Posts: 5
Joined: Tue Dec 10, 2013 5:18 am

Re: FILE BROWSE

by smugford » Sun Jan 05, 2014 9:13 am

Code: Select all
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080

# This is the configuration for your project
Listen 127.0.0.1:8080

<VirtualHost 127.0.0.1:8080>
  DocumentRoot "/home/sfproject/web"
  DirectoryIndex index.php
  <Directory "/home/sfproject/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /home/sfproject/lib/vendor/symfony/data/web/sf
  <Directory "/home/sfproject/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>


http://localhost:8080/

port 80 is the default port change it to 8080

http://symfony.com/legacy/doc/gentle-introduction/1_4/en/03-Running-Symfony
User avatar
smugford
Faithful Member
 
Posts: 245
Joined: Sun Nov 29, 2009 8:32 pm

Re: FILE BROWSE

by jupong47 » Mon Jan 06, 2014 5:54 am

;-) tnx dude for your reply, i really appreciate it... ive done that way dude.. and yes i also use port 8080
but the problem dude is: i am no longer allowed to access other file(s) in my htdocs directory... do you have any furder solution dudez?
im still curing it but cant find sol. but still im climbing .. :) because of forums like this..

thnx Dudez.
jupong47
Junior Member
 
Posts: 5
Joined: Tue Dec 10, 2013 5:18 am

Re: FILE BROWSE

by smugford » Mon Jan 13, 2014 12:10 am

in your httpd.conf file look for

<Directory "/var/www">

or similar.

there is a default directory that apache uses if it can't find anything else.

you've either turned on virtualhosts so it's ignoring your default directory.

or you've changed the default directory.

it's definately an apache problem through so search for "Configuring Apache Virtual Hosts"

and Apache Default Directory in xampp or wamp.

for some strange reason they have two httpd.conf files so search the dir for the file and make sure you are using the right one.
User avatar
smugford
Faithful Member
 
Posts: 245
Joined: Sun Nov 29, 2009 8:32 pm

Re: FILE BROWSE

by jupong47 » Thu Jan 23, 2014 3:15 am

Thanks Dude for the reply.. :) i tried to enable the virtual host and it did work; the file
c:/xamp/htdocs/climbing/config/databases.yml is not accessible but the "web" directory is still there when i access any module...

Ex. c:/xamp/htdocs/climbing/web/module_name : ( I want to remove "web").. and the case in symfony configuration the other htdocs file is not accesible..

but Thanks for the reply dude... i appreciate it... :-)
jupong47
Junior Member
 
Posts: 5
Joined: Tue Dec 10, 2013 5:18 am

Re: FILE BROWSE

by smugford » Sat Feb 15, 2014 1:05 am

probably to late but removing the /web directory is a bad idea.

it is where your front controllers live and it is the only folder (and sub folders) that should be web accessible. frontend.php frontend_dev.php etc are the front controllers (everything in the symfony apps are fired through this file)

anyway glad I could help
User avatar
smugford
Faithful Member
 
Posts: 245
Joined: Sun Nov 29, 2009 8:32 pm