subdomains problem
Posted by: erandi1993 (5.206.239.---)
Date: July 11, 2015 04:04PM

Hello there ,i have setup virtualh hosts, but now i want to create subdomains, i have created directory folder on:

c:\wamp\subdomains\example also tried on c:\wamp\www\subdomains\example

and i have set the following lines on: C:\wamp\bin\apache\apache2.4.9\conf\extra

<VirtualHost *:80>
DocumentRoot "c:\wamp\www\subdomains\example"
ServerName filma-24.com
ServerAlias example.filma-24.com
<Directory "c:\wamp\www\subdomains\example">
AllowOverride All
Require all granted
</Directory>

php_flag display_errors Off
php_flag log_errors On

php_value max_upload_size 40M
php_value max_execution_time 120
php_value error_log "c:/wamp/logs/example_com_phperror.log"
</VirtualHost>

i have restarted apache and all services ,but subdomains again dont work

Options: ReplyQuote
Re: subdomains problem
Posted by: RiggsFolly (---.as43234.net)
Date: July 12, 2015 09:18PM

Please read the manual [httpd.apache.org]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: subdomains problem
Posted by: erandi1993 (5.206.239.---)
Date: July 13, 2015 07:50PM

sorry but i don't understand, is hard for you to tell me how to configure on "httpd-vhosts.conf" ?

Options: ReplyQuote
Re: subdomains problem
Posted by: RiggsFolly (---.as43234.net)
Date: July 13, 2015 09:06PM

No not hard. But it would be better if you took the time to understand what a subdomain was and then implement it properly yourself.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: subdomains problem
Posted by: erandi1993 (5.206.239.---)
Date: July 14, 2015 10:44AM

oh i have look much tutorials ,but didn't work for me ,i dont know why ,please tell me then i will remember ,everyone who tell me something i remember for next time



Edited 1 time(s). Last edit at 07/14/2015 10:45AM by erandi1993.

Options: ReplyQuote
Re: subdomains problem
Posted by: Otomatic (Moderator)
Date: July 14, 2015 04:14PM

Hi,

Example of httpd-vhosts.conf file that works for me :
<VirtualHost *:80>
   ServerName le-pointu.aviatechno
   DocumentRoot G:/www/le.pointu
  <Directory "G:/www/le.pointu/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require local
  </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName faq-fra.aviatechno
   DocumentRoot G:/www/faq-fra
    <Directory "G:/www/faq-fra/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require local
  </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName dev.aviatechno
   DocumentRoot G:/www/aviatechno
  <Directory "G:/www/aviatechno/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require local
  </Directory>
</VirtualHost>
And in the hosts file:
127.0.0.1 dev.aviatechno
127.0.0.1 le-pointu.aviatechno
127.0.0.1 faq-fra.aviatechno

::1 dev.aviatechno
::1 le-pointu.aviatechno
::1 faq-fra.aviatechno

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 07/14/2015 05:30PM by Otomatic.

Options: ReplyQuote
Re: subdomains problem
Posted by: erandi1993 (46.19.227.---)
Date: July 14, 2015 08:41PM

I dont need to config hosts file because im using wampserver for online server not localhost, on VPS

i tried this but again dont work ,see image link below how is my httpd-vhosts.conf :
[i.imgur.com]



Edited 1 time(s). Last edit at 07/15/2015 01:08AM by erandi1993.

Options: ReplyQuote
Re: subdomains problem
Posted by: Otomatic (Moderator)
Date: July 15, 2015 09:51AM

Hi,

Please, when it comes to text, paste text, do not put an image. Nothing infuriates me that this kind of practice.
- 1 - wamp/www/ IS localhost and nothing else
- 2 - Missing the VirtualHost localhost in your file
- 3 - Do not add log and other changes before it works.
- 4 - YOU NEED hosts file. It is definitely not reserved for local use.

However, if you achieve your goals without using the hosts file, let us know the solution.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: subdomains problem
Posted by: erandi1993 (5.206.239.---)
Date: July 15, 2015 11:06AM

hello im not good on englisht ,can you please just tell me how to setup subdomains ?
my site is www.filma-24.com using wamp server from VPS,i have setup virtual host using tutorials, i have setup subdomain that you tell me ,but it works just on localhost others can't join? again here is my httpd-vhosts.conf:

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName filma-24.com
ServerAlias www.filma-24.com
<Directory "c:/wamp/www">
AllowOverride All
Require all granted
</Directory>

php_flag display_errors Off
php_flag log_errors On

php_value max_upload_size 40M
php_value max_execution_time 120
php_value error_log "c:/wamp/logs/example_com_phperror.log"
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/wamp/vovost.ru/www"
ServerName vovost.ru
ServerAlias www.vovost.ru
<Directory "c:/wamp/vovost.ru/www">
AllowOverride All
Require all granted
</Directory>

php_flag display_errors Off
php_flag log_errors On

php_value max_upload_size 40M
php_value max_execution_time 120
php_value error_log "c:/wamp/logs/example_com_phperror.log"
</VirtualHost>



Edited 2 time(s). Last edit at 07/15/2015 11:16AM by erandi1993.

Options: ReplyQuote
Re: subdomains problem
Posted by: Otomatic (Moderator)
Date: July 15, 2015 03:10PM

Hi,

Do you read completely answers that you are doing? Do you read completely explanatory tutorials?
ALL THAT have already been given to you!
We are not here to do the work for you. Read, reread, repeatedly if necessary, and apply! But apply EXACTLY as you are told to do and not like you want to do it depended on the explanations given.

- 1 - You should not put files in wamp/www/
- 2 - The content of wamp/www/ must not be changed, except to add folders.
- 3 - C:/wamp/www/ IS ONLY localhost and nothing else.
- 4 - Do not add log and other changes in VirtualHost before it works.
- 5 - YOU NEED hosts file. It is definitely not reserved for local use.
httpd-vhost.conf file
<VirtualHost *:80>
  DocumentRoot "c:/wamp/www"
  ServerName localhost
  <Directory "c:/wamp/www">
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "c:/wamp/www/my-dir"
  ServerName filma-24.com
  ServerAlias www.filma-24.com
  <Directory "c:/wamp/www/my-dir">
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "c:/wamp/vovost.ru/www"
  ServerName vovost.ru
  ServerAlias www.vovost.ru
  <Directory "c:/wamp/vovost.ru/www">
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>
and, in the file c:\windows\system32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 filma-24.com
127.0.0.1 vovost.ru

::1 localhost
::1 filma-24.com
::1 vovost.ru
If you want subdomain, you add it in httpd-vhost.conf, like this
<VirtualHost *:80>
  DocumentRoot "c:/wamp/another-dir/www"
  ServerName subdomain.vovost.ru
  ServerAlias www.subdomain.vovost.ru
  <Directory "c:/wamp/another-dir/www">
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>
and in the file c:\windows\system32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 filma-24.com
127.0.0.1 vovost.ru subdomain.vovost.ru

::1 localhost
::1 filma-24.com
::1 vovost.ru  subdomain.vovost.ru

Nota : (http://www.filma-24.com/) and (http://filma-24.com/) are real websites, so it is a very bad idea to use the same domain names.

In addition, it is a site that violates copyright, so: This will be my last answer and I close this discussion

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 2 time(s). Last edit at 07/15/2015 05:44PM by Otomatic.

Options: ReplyQuote


Sorry, you can't reply to this topic. It has been closed.