Installation of zf2 on LAMP in kali linux? - php

I tried a lot to run directly through zend.localhost and and got frustrated
I am using xammp in kali linux
but it shows as in pic
I had added this in my httpd-vhost.conf
<VirtualHost *:80>
ServerName zend.localhost
DocumentRoot /opt/lampp/htdocs/zend/public
<Directory /opt/lampp/htdocs/zend/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

We will need a little more explanation on your error to help you ...
Did you mapped zend.localhost to 127.0.0.1 (or your ip address) in your /etc/hosts ?

Related

How do I customize an URL for Laravel?

Im on windows 10, trying to customize an url to use Laravel. I dont want to acess the url using public folder on it. Im using wamp and apache is running on port 8080. So I edit the file wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf like this:
<VirtualHost *:80>
DocumentRoot c:/wamp/www/
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/wamp/www/laravel_test/blog/public
ServerName laravel_test.dev
</VirtualHost>
After that, I edit the file system32/drivers/etc/hosts with:
127.0.0.1 localhost
127.0.0.1 laravel_test.dev
And when I access the url laravel_test.dev it doesnt work. I tried to use this too on httpd-vhosts.conf:
<VirtualHost *:8080>
And it doesnt work either. I always restart the service on wamp, and nothing changes.
I couldnt install and configure the homestead properly, so im trying to use wamp now. Can somebody help me?
In your httpd.conf file you need to uncomment the virtual Hosts section
Then,
Your vhost needs to listen on port 8080
<VirtualHost *:8080>
ServerName laraveltest.dev
ServerAlias www.laraveltest.dev
DocumentRoot c:/wamp/www/laravel_test/blog/public
<Directory "c:/wamp/www/laravel_test/blog/public">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
For your hosts file
127.0.0.1 laraveltest.dev www.laraveltest.dev

Why can't view the my project in zend framework 1.12

I am struck Here, create one project, project name is medicals.
I am Using xampp. i wrote in http.conf like.
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/medicals/public"
ServerName medicals.com
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "C:/xampp/htdocs/medicals/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
And,Using Windows path:C:\Windows\System32\drivers\etc point to.
127.0.0.1 medicals.com
i have an error im my browser to access the medicals.com.
Where is the actual issue. i did't understand.
Thhanks in advance.
Please Confirm your port is 80, In case you use another port in xampp u can change the line <VirtualHost *:80> to <VirtualHost *:8080>, the 8080 is a port number second commonly used, you change 8080 into your port,
your port number shown in xampp control pannel PFA
Copy following code :
<VirtualHost *:80>
ServerName medicals.com
DocumentRoot "C:/xampp/htdocs/medicals/public"
SetEnv APPLICATION_ENV "development"
<Directory "C:/xampp/htdocs/medicals/public">
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
To:
C:/xampp/apache/conf/extra/httpd-vhosts.conf
And also add following line :
127.0.0.1 medicals.com
to
C:/Windows/System32/drivers/etc
And also make sure your mod_rewrite is enabled and don't forget to restart your apache server after change.
This works for me in zf3. If it does not work in zf1 you may want to look at this.
https://framework.zend.com/manual/1.10/en/project-structure.rewrite.html

wamp 404 this webpage is not available

I have installed wamp a handful of times, and have it working on my local environment. Currently I am attempting to resolve an issue on a server of mine which is running wamp. I uninstalled a working copy, and now when I attempted to reinstall I have been unsuccessful. I have changed the port to be 8080 and have configured the httpf.config to do so.
ServerName 50.56.176.95:8080
ServerRoot "C:/wamp/bin/apache/apache2.4.9"
Listen 50.56.176.95:8080
<virtualHost *:8080>
DocumentRoot "c:/wamp/www/Hi"
ServerName 50.56.176.95
</virtualHost>
<virtualHost *:8080>
DocumentRoot "c:/wamp/www/Hi"
ServerName 50.56.176.95
<directory "c:/wamp/www/Hi">
Order allow,deny
Allow from all
Require all granted
</directory>
</virtualHost>
Wamp turns on and apache and php start up, however if I attempt o access 50.56.176.96:8080 I will get a 404 error.
Something to note is that everything is commented out in the htacces file in the www directory.
Should the ServerName not actually be a name and not an ip address?
Also you are using Apache 2.2 and Apache 2.4 access control syntax in the same VH def? As you are using Apache 2.4 it may be best to stick to 2.4 syntax.
So maybe this will work :-
<VirtualHost *:8080>
DocumentRoot "c:/wamp/www/Hi"
ServerName hi.com
ServerAlias www.hi.com
<Directory "c:/wamp/www/Hi">
Require all granted
</Directory>
</VirtualHost>

Installing magento on local virtual host windows 7

I am trying to install magento on a virtual host in my system running with XAMPP
I have done following till now :
Added lines in the hosts file under windows/system32/driver/host
192.168.1.69 magento2.hue
192.168.1.69 www.magento2.hue
Then added code in httpd-vhosts.conf in XAMPP folder
NameVirtualHost 192.168.1.69:80
<VirtualHost magento2.hue>
ServerAdmin magento2.hue
DocumentRoot "C:/www/mag_domain2/httpdocs/"
ServerName magento2.hue
ServerAlias www.magento2.hue
ErrorLog "C:/www/mag_domain2/httpdocs/error.log"
CustomLog "C:/www/mag_domain2/httpdocs/access.log" combined
<Directory "C:/www/mag_domain2/httpdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Restarted Apache and Mysql, but the site i.e magento2.hue is not loading.
Can you please figure out if i am doing something wrong here ?
try with below httpd.conf setting it working at my end
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/yourmagentosetup"
ServerName magento2.hue
</VirtualHost>
hope this will sure work for you.
Oh my,
I just figure it out.. i have previously added another vhost which points to 192.168.1.59 and is working fine
I just needed to point new one to the same IP and change the ServerName to magento2.hue instead of magento.hue as was of previous one.
it works now.
Thanks liyakat and Arjun for viewing this question.

Problems in installing Laravel at localhost

I am trying to install PHP-Laravel in Windows 8 and I am using Xamp server(localhost). I am following Installing Laravel guide.
According to this guide I am making virtual host using following code :
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/TssApp/public"
ServerName TssApp
<Directory "C:/xampp/htdocs/TssApp/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
</Directory>
</VirtualHost>
//Where "C:/xampp/htdocs/TssApp/public" is path of Laravel public folder
and I have also added following line in in etc/hosts
127.0.0.2 TssApp
After doing necessary steps mentioned in this tutorial when I type "http://TssApp" , it always redirect to "http://tssapp/xampp/" instead of Laravel Home page. I don't know if I am missing any thing.
Note: I can access laravel home page at "http://localhost/tssapp/public/" but want
to use "http://TssApp" link to access my application.
Please help me regarding this issue.
Thanks .
Do you have NameVirtualHost * in your virtual-hosts configuration?
You'll need to restart Apache after any changes to either /etc/hosts or your virtual-hosts configuration files
Try adding the code to C:\xampp\apache\conf\extra\httpd-vhosts.conf instead of adding it to your own conf file. As far as I know xampp will ignore it unless its in the vhosts file.
You could try this.
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs\TssApp\public"
ServerName tssapp
<Directory "C:\xampp\htdocs\TssApp\public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Although you should put your files in the xampp directory and not the htdocs directory, so your files should be C:\xampp\TssApp\public, This would stop people from visiting htdocs which is a public folder and getting access to your application.
According to the documentation (that you point to), you should write
<VirtualHost 127.0.0.2>
and not
<VirtualHost *:80>
Could you try that and restart your computer/server?
Add in:
Allow from all
after
AllowOverride all
The end result should be:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/TssApp/public"
ServerName TssApp
<Directory "C:/xampp/htdocs/TssApp/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Allow from all
</Directory>
</VirtualHost>
Also make sure you are editing the file "httpd-vhosts.conf" found in:
C:\xampp\apache\conf\extra

Categories