I'm learning Laravel PHP. So I followed a tutorial on YouTube about creating a virtual host for XAMPP Apache server and I tried to modify httpd-vhosts.conf file in XAMPP/apache/conf/extra. My project directory is "D:\Applications\XAMPP\htdocs\www\EpsilonProgram" so how do I set the DocumentRoot in httpd-vhosts.conf? If I set as
DocumentRoot "D:\Applications\XAMPP\htdocs\www\EpsilonProgram"
and then turn on XAMPP Apache server and run
http://localhost/
, it always displays
Forbidden
You don't have permission to access this resource.
Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.8 Server at localhost Port 80
Please help!
Related
I have changed the port number in apache in bitnami wamp stack by following changes in httpd.conf file.
Listen 8083
ServerName localhost:8083
After changing the server is not able to access in interenet. In localhost it is showing the home page.
I have added the :8083 after the ip address.Can anyone please help on this?
You don't need ServerName localhost:8083 just ServerName localhost. In browser:
localhost:8083
I changed the port to 8080 on wamp in the httpd.conf file and it works using localhost:8080. However, I don't seem to be able to open any file in the wwww-folder, not even the index.php which supposedly is running when using the url localhost:8080
localhost:8080/index gives me
Not Found
The requested URL /index was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 8080
Has the path changed? How do I look this up?
In httpd.conf, you have to change both lines "Listen" and "ServerName" to change the port 80 to 8080.
I have just started using laravel and a mac to develop websites. I have gone through the setup and tried following a phpacademy tutorial.
My problem is that when i try and access the localhost, as default i get the index page where all my folders are stored and when i enter my direct path e.g. laravelpractice.local in the web browser i get the error that i mentioned in the title.
i have edited the /etc/apache2/httpd.conf and the /etc/hosts to create a virtual host and create a custom url respectively and the spelling seems to be fine.
/etc/hosts file open. You must be the owner of the file.
127.0.0.1 localhost.localdomain localhost
after add
127.0.0.1 laravelpractice.local
000-default.config file save. After /etc/apache2/sites-enabled/000-default.config file open. You must be the owner of the file. Add to the bottom
<VirtualHost *:80>
DocumentRoot "/var/www/laravelpractice/public/"
ServerName laravelpractice.local
</VirtualHost>
Apache restart with terminal:
sudo service apache2 restart
Open browser and url : laravelpractice.local
We have dedicated windows server where IIS running in :80 and Wamp running in :85.
I successfully created a Virtual Host for wamp server which is running in :85.
NameVirtualHost *:85
<VirtualHost *:85>
ServerName www.my.tv
ServerAlias my.tv
DocumentRoot C:/wamp/www/alpha
ErrorLog "C:/wamp/www/alpha/logs/error.log"
CustomLog "C:/wamp/www/alpha/logs/access.log" common
</VirtualHost>
yes the above code is working & site is running only when i hit www.my.tv:85 but not in www.my.tv
can someone advice on the above where i could configure to make the site run at www.my.tv
If you configure Apache to serve your site on port 85 then the browser (which will default to port 80) won't find it unless you give it the port number it needs.
If you need to see the site on port 80 then you need to configure it on that port. Since you have another server running on that port it's not an option.
One possibility is that you create a virtual site on your IIS server for www.my.tv, but have it redirect to the site on port 85. You can do this in the properties box, on the Home Directory tab.
How to enable php execution on a web server in virtual host config file? I am on a VPS. phpmyadmin is working which means I have php installed and working.
I am getting the error message
client denied by server configuration: phpinfo.php
Forbidden You don't have permission to access phpinfo.php on this server. Apache/2.2.14 (Ubuntu) Server at abc.com Port 80
verify your
/etc/apache2/httpd.conf
line Allow from 127.0.0.1
Add your IP.
Also verify files and folders permision and group
(ls -l to www to phpinfo.php etc...)