0

I have a website on a debian linux server. My virtualhost pointed into a folder(/var/www/my-first-website), I want to change the destination to another folder(my-second-website) I restart the server after every change: service apache2 restart I erased dns caches: service nscd restart and even /etc/ini.d/networking restart But it doesn't affect and it goes still to: var/www/my-first-website

Has anyone any idea about it? I am sure that I don't have any information about /my-first-website, in my virtualhost.

ServerAdmin webmaster@localhost 
ServerName www.my-website.com   
ServerAlias www.my-website.com

DocumentRoot /var/www/my-second-website 
<Directory /var/www/my-second-website>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride All
    #Sécurisation du site
    <IfModule mod_php5.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals 0
        php_value magic_quotes_gpc 0
        php_value magic_quotes_runtime 0
        php_value allow_call_time_pass_reference 0
    </IfModule>

    #Régles de réécriture
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /


        RewriteRule ^api/ index_rest.php [L]
        RewriteRule ^index_rest\.php - [L]
        RewriteRule ^([^/]+/)?content/treemenu.* index_treemenu\.php [L]
        RewriteRule ^var/([^/]+/)?storage/images(-versioned)?/.* - [L]
        RewriteRule ^var/([^/]+/)?cache/(texttoimage|public)/.* - [L]
        RewriteRule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        RewriteRule ^share/icons/.* - [L]
        RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]
        RewriteRule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^var/storage/packages/.* - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^/design/standard/images/favicon\.ico - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^robots\.txt - [L]
        RewriteRule ^Sitemap.xml - [L]
        RewriteRule ^BingSiteAuth.xml - [L]
        RewriteRule ^w3c/p3p\.xml - [L]
        RewriteRule .* index\.php
        RewriteRule ^/css/.*\.css - [L]
        RewriteRule ^/js/.*\.js - [L]

    </IfModule>


</Directory>
# Environment.
# Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration
# Defaults to "prod" if omitted
SetEnv ENVIRONMENT "prod"

# Whether to use Symfony's ApcClassLoader.
# Possible values: 0 or 1
# Defaults to 0 if omitted
#SetEnv USE_APC_CLASSLOADER 0

# Prefix used when USE_APC_CLASSLOADER is set to 1.
# Use a unique prefix in order to prevent cache key conflicts
# with other applications also using APC.
# Defaults to "ezpublish" if omitted
#SetEnv APC_CLASSLOADER_PREFIX "ezpublish"

# Whether to use debugging.
# Possible values: 0 or 1
# Defaults to 0 if omitted, unless ENVIRONMENT is set to: "dev"
#SetEnv USE_DEBUGGING 0

# Whether to use Symfony's HTTP Caching.
# Disable it if you are using an external reverse proxy (e.g. Varnish)
# Possible values: 0 or 1
# Defaults to 1 if omitted, unless ENVIRONMENT is set to: "dev"
#SetEnv USE_HTTP_CACHE 1

# Defines the proxies to trust.
# Separate entries by a comma
# Example: "proxy1.example.com,proxy2.example.org"
# By default, no trusted proxies are set
#SetEnv TRUSTED_PROXIES "127.0.0.1"

# Everything below is optional to improve performance by forcing
# clients to cache image and design files, change the expires time
# to suite project needs.

#Pour les logs
ErrorLog ${APACHE_LOG_DIR}/logOfficiel/errorgm.log
LogLevel crit
CustomLog ${APACHE_LOG_DIR}/logOfficiel/accessgm.log combined

ServerSignature Off

mhatch
  • 4,441
  • 6
  • 36
  • 62
Noon
  • 139
  • 1
  • 3
  • 11
  • Let's see your vhost files – Jon Lin Oct 01 '13 at 13:46
  • I added it here but i saw something very strange : – Noon Oct 01 '13 at 14:38
  • in my siteavailable folder i have another vhost which has exactely the same configuration but it is pointed to var/www/my-first-website (www.fsite.com) when i change its destination to the second-website my other vhost has modified as well. on another word they are switched! but i want to have both of them and use bothe them www.my-website.com >> my-second-website www.fsite.com >> my-first-website – Noon Oct 01 '13 at 14:44

0 Answers0