开发者

symfony wrong index and auto redirect to xampp webpage

I installed xampp and it works great with my symfony. I even made few excercises on projects. However I cannot setup my latest project which was coppied from another PC.

How it looks: well the site opening in

http://localhost/ppz/chujwiecotobedzie/web/frontend_dev.php

looks good, but when i make

symfony cc

(in case) and then open in

http://localhost/ppz/chujwiecotobedzie/web/

the page is redirecting to xampp homepage.

I use symfony 1.4 There are frontend and backend folders. I was working only in frontend folder. I think that any file can make this mess but i dont know. Please help.

xamp-apache:

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
    ##ServerAdmin postmaster@dummy-host.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
    ##ServerName dummy-host.localhost
    ##ServerAlias www.dummy-host.localhost
    ##ErrorLog "logs/dummy-host.localhost-error.log"
    ##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
    ##ServerAdmin postmaster@dummy-host2.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
    ##ServerName dummy-host2.localhost
    ##ServerAlias www.dummy-host2.localhost
    ##ErrorLog "logs/dummy-host2.localhost-error.log"
    ##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>

windows hosts:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

127.0.0.1 localhost

I am working with netbeans 7 with installed plugins: php + symfony


edit1: i changed path from myproject to real my path chu...

symfony wrong index and auto redirect to xampp webpage

symfony wrong index and auto redirect to xampp webpage

In front page opened by frontend_dev i can see text from indexSuccess:

symfony wrong index and auto redirect to xampp webpage

But if i click any link it shows:

symfony wrong index and auto redirect to xampp webpage


how i solved: 1 chnaged this directory to shorter and put in another. C:\www

2 in this folder i put all files from project: apps, cache, etc (if you dont have file 'symfony' you ought make it, this way symfony will know this is symfony directory project)

3 c:\Windows\System32\drivers\etc\hosts i put only one sign: 127.0.0.1 localhost.tld

4 in apache: C:\xampp\apache\conf\extra\ httpd vhost i put: NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
 ServerName localhost.tld
 DocumentRoot "C:\www\web"
 DirectoryIndex index.php
 <Di开发者_开发技巧rectory "C:\www\web">
 AllowOverride All
 Allow from All
 </Directory>
</VirtualHost>

5 in netbeans> properities of my project > run configuration > project url > i wrote: http://localhost.ltd/


It seems to me like there is a mix up regarding the folders.

frontend_dev.php should be inside of the web/ directory

if localhost/myproject/project1/frontend_dev.php is working, then the production version should be accessible at:

localhost/myproject/project1/index.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜